Fix floating toolbar showing on some screens while bottom sheet is collapsing

This commit is contained in:
Jays2Kings 2021-05-07 23:16:51 -04:00
parent 090e9ee005
commit f6f236e1d9
2 changed files with 9 additions and 5 deletions

View File

@ -333,9 +333,11 @@ class RecentsController(bundle: Bundle? = null) :
} }
fun updateTitleAndMenu() { fun updateTitleAndMenu() {
if (router.backstack.lastOrNull()?.controller == this) {
(activity as? MainActivity)?.setFloatingToolbar(!showingDownloads, true) (activity as? MainActivity)?.setFloatingToolbar(!showingDownloads, true)
setTitle() setTitle()
} }
}
private fun setBottomPadding() { private fun setBottomPadding() {
val bottomBar = activityBinding?.bottomNav ?: return val bottomBar = activityBinding?.bottomNav ?: return

View File

@ -229,10 +229,12 @@ class BrowseController :
} }
fun updateTitleAndMenu() { fun updateTitleAndMenu() {
if (router.backstack.lastOrNull()?.controller == this) {
(activity as? MainActivity)?.setFloatingToolbar(!showingExtensions) (activity as? MainActivity)?.setFloatingToolbar(!showingExtensions)
activity?.invalidateOptionsMenu() activity?.invalidateOptionsMenu()
setTitle() setTitle()
} }
}
fun setBottomSheetTabs(progress: Float) { fun setBottomSheetTabs(progress: Float) {
val bottomSheet = binding.bottomSheet.root val bottomSheet = binding.bottomSheet.root