Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fenix/125.3.0' into iceraven
Browse files Browse the repository at this point in the history
  • Loading branch information
akliuxingyuan committed May 1, 2024
2 parents 9c50d29 + 06a888f commit 6472b0e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/src/main/java/org/mozilla/fenix/HomeActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -833,9 +833,13 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
}

final override fun onUserLeaveHint() {
supportFragmentManager.primaryNavigationFragment?.childFragmentManager?.fragments?.forEach {
if (it is UserInteractionHandler && it.onHomePressed()) {
return
// The notification permission prompt will trigger onUserLeaveHint too.
// We shouldn't treat this situation as user leaving.
if (!components.notificationsDelegate.isRequestingPermission) {
supportFragmentManager.primaryNavigationFragment?.childFragmentManager?.fragments?.forEach {
if (it is UserInteractionHandler && it.onHomePressed()) {
return
}
}
}

Expand Down

0 comments on commit 6472b0e

Please sign in to comment.