Skip to content

Commit

Permalink
Merge pull request #186 from skydoves/fix/dismiss-when-lifecycle-pause
Browse files Browse the repository at this point in the history
Invoke dismiss() instead of the onDestroy() on Pause lifecycle event
  • Loading branch information
skydoves authored Apr 21, 2021
2 parents 8984605 + 0fafcfd commit ba0df2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class ProfileBalloonFactory : Balloon.Factory() {
setBalloonAnimation(BalloonAnimation.CIRCULAR)
setDismissWhenTouchOutside(true)
setDismissWhenShowAgain(true)
setDismissWhenLifecycleOnPause(true)
setLifecycleOwner(lifecycle)
}
}
Expand Down
2 changes: 1 addition & 1 deletion balloon/src/main/java/com/skydoves/balloon/Balloon.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ class Balloon(
@OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
fun onPause() {
if (builder.dismissWhenLifecycleOnPause) {
onDestroy()
dismiss()
}
}

Expand Down

0 comments on commit ba0df2a

Please sign in to comment.