From 48a4b3091f07bf97a8e631a7f4ece21372901e6f Mon Sep 17 00:00:00 2001 From: Jays2Kings Date: Sat, 24 Apr 2021 15:12:43 -0400 Subject: [PATCH] Fix recents having transparent appbar on pop enter --- .../main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 52a6e8bd5e..3bb48dd298 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 @@ -26,6 +26,7 @@ import androidx.appcompat.widget.Toolbar import androidx.core.content.ContextCompat import androidx.core.graphics.ColorUtils import androidx.core.view.GestureDetectorCompat +import androidx.core.view.isGone import androidx.core.view.isVisible import androidx.lifecycle.lifecycleScope import com.bluelinelabs.conductor.Conductor @@ -360,7 +361,7 @@ open class MainActivity : BaseActivity(), DownloadServiceLi binding.toolbar.isVisible = !show binding.cardFrame.isVisible = show binding.appBar.setBackgroundColor( - if (show && !solidBG) Color.TRANSPARENT else getResourceColor(R.attr.colorSecondary) + if (show && !solidBG && binding.tabsFrameLayout.isGone) Color.TRANSPARENT else getResourceColor(R.attr.colorSecondary) ) currentToolbar?.setNavigationOnClickListener { val rootSearchController = router.backstack.lastOrNull()?.controller() @@ -787,6 +788,9 @@ open class MainActivity : BaseActivity(), DownloadServiceLi } else { binding.tabsFrameLayout.isVisible = show } + if (show) { + binding.appBar.setBackgroundColor(getResourceColor(R.attr.colorSecondary)) + } } override fun downloadStatusChanged(downloading: Boolean) {