diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentsController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentsController.kt index 39e207f0db..7e3145c34d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentsController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentsController.kt @@ -333,8 +333,10 @@ class RecentsController(bundle: Bundle? = null) : } fun updateTitleAndMenu() { - (activity as? MainActivity)?.setFloatingToolbar(!showingDownloads, true) - setTitle() + if (router.backstack.lastOrNull()?.controller == this) { + (activity as? MainActivity)?.setFloatingToolbar(!showingDownloads, true) + setTitle() + } } private fun setBottomPadding() { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/source/BrowseController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/source/BrowseController.kt index 81750b587e..3cad5ebc18 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/source/BrowseController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/source/BrowseController.kt @@ -229,9 +229,11 @@ class BrowseController : } fun updateTitleAndMenu() { - (activity as? MainActivity)?.setFloatingToolbar(!showingExtensions) - activity?.invalidateOptionsMenu() - setTitle() + if (router.backstack.lastOrNull()?.controller == this) { + (activity as? MainActivity)?.setFloatingToolbar(!showingExtensions) + activity?.invalidateOptionsMenu() + setTitle() + } } fun setBottomSheetTabs(progress: Float) {