Fix solid appbar bg when leaving recents to another tab

Caused by 48a4b3091
This commit is contained in:
Jays2Kings 2021-04-24 17:01:14 -04:00
parent fe09262a66
commit 371b77e75f

View File

@ -26,7 +26,6 @@ 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
@ -361,7 +360,7 @@ open class MainActivity : BaseActivity<MainActivityBinding>(), DownloadServiceLi
binding.toolbar.isVisible = !show
binding.cardFrame.isVisible = show
binding.appBar.setBackgroundColor(
if (show && !solidBG && binding.tabsFrameLayout.isGone) Color.TRANSPARENT else getResourceColor(R.attr.colorSecondary)
if (show && !solidBG) Color.TRANSPARENT else getResourceColor(R.attr.colorSecondary)
)
currentToolbar?.setNavigationOnClickListener {
val rootSearchController = router.backstack.lastOrNull()?.controller()