From 42d297c02ffa647607089448057a700f266348d7 Mon Sep 17 00:00:00 2001 From: Jays2Kings Date: Thu, 8 Apr 2021 21:29:23 -0400 Subject: [PATCH] Fix tab bar hiding when tapping on resetting chapter history --- .../main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt | 2 +- .../java/eu/kanade/tachiyomi/ui/recents/RecentsController.kt | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt index ea765d069d..dd1b6d385b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt @@ -659,7 +659,7 @@ open class MainActivity : BaseActivity(), DownloadServiceLi fun showTabBar(show: Boolean, animate: Boolean = true) { if (animate) { - if (show) { + if (show && !binding.tabsFrameLayout.isVisible) { binding.tabsFrameLayout.alpha = 0f binding.tabsFrameLayout.isVisible = true } 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 6db9ce9f31..724752fd96 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 @@ -30,6 +30,7 @@ import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.data.library.LibraryUpdateService import eu.kanade.tachiyomi.databinding.RecentsControllerBinding import eu.kanade.tachiyomi.ui.base.controller.BaseController +import eu.kanade.tachiyomi.ui.base.controller.DialogController import eu.kanade.tachiyomi.ui.main.BottomSheetController import eu.kanade.tachiyomi.ui.main.MainActivity import eu.kanade.tachiyomi.ui.main.RootSearchInterface @@ -579,7 +580,9 @@ class RecentsController(bundle: Bundle? = null) : } } else { if (type == ControllerChangeType.POP_EXIT) presenter.onDestroy() - (activity as? MainActivity)?.showTabBar(false) + if (router.backstack.lastOrNull()?.controller() !is DialogController) { + (activity as? MainActivity)?.showTabBar(false) + } snack?.dismiss() } setBottomPadding()