Fixed crash when pressing up arrow in search activity
This commit is contained in:
parent
8da4b677ea
commit
6e99caf458
1 changed files with 4 additions and 3 deletions
|
@ -542,9 +542,10 @@ class MangaDetailsController : BaseController,
|
|||
val colorSecondary = activity?.getResourceColor(
|
||||
R.attr.colorSecondary
|
||||
) ?: Color.BLACK
|
||||
if (router.backstack.last().controller() !is MangaDetailsController) {
|
||||
(activity as MainActivity).appbar.setBackgroundColor(colorSecondary)
|
||||
(activity as MainActivity).toolbar.setBackgroundColor(colorSecondary)
|
||||
if (router.backstackSize > 0 &&
|
||||
router.backstack.last().controller() !is MangaDetailsController) {
|
||||
(activity as? MainActivity)?.appbar?.setBackgroundColor(colorSecondary)
|
||||
(activity as? MainActivity)?.toolbar?.setBackgroundColor(colorSecondary)
|
||||
|
||||
activity?.window?.statusBarColor = activity?.getResourceColor(
|
||||
android.R.attr.statusBarColor
|
||||
|
|
Reference in a new issue