mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-24 01:31:50 +01:00
Fix recents having transparent appbar on pop enter
This commit is contained in:
parent
9572c9b7ee
commit
48a4b3091f
@ -26,6 +26,7 @@ import androidx.appcompat.widget.Toolbar
|
|||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.graphics.ColorUtils
|
import androidx.core.graphics.ColorUtils
|
||||||
import androidx.core.view.GestureDetectorCompat
|
import androidx.core.view.GestureDetectorCompat
|
||||||
|
import androidx.core.view.isGone
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import com.bluelinelabs.conductor.Conductor
|
import com.bluelinelabs.conductor.Conductor
|
||||||
@ -360,7 +361,7 @@ open class MainActivity : BaseActivity<MainActivityBinding>(), DownloadServiceLi
|
|||||||
binding.toolbar.isVisible = !show
|
binding.toolbar.isVisible = !show
|
||||||
binding.cardFrame.isVisible = show
|
binding.cardFrame.isVisible = show
|
||||||
binding.appBar.setBackgroundColor(
|
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 {
|
currentToolbar?.setNavigationOnClickListener {
|
||||||
val rootSearchController = router.backstack.lastOrNull()?.controller()
|
val rootSearchController = router.backstack.lastOrNull()?.controller()
|
||||||
@ -787,6 +788,9 @@ open class MainActivity : BaseActivity<MainActivityBinding>(), DownloadServiceLi
|
|||||||
} else {
|
} else {
|
||||||
binding.tabsFrameLayout.isVisible = show
|
binding.tabsFrameLayout.isVisible = show
|
||||||
}
|
}
|
||||||
|
if (show) {
|
||||||
|
binding.appBar.setBackgroundColor(getResourceColor(R.attr.colorSecondary))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun downloadStatusChanged(downloading: Boolean) {
|
override fun downloadStatusChanged(downloading: Boolean) {
|
||||||
|
Loading…
Reference in New Issue
Block a user