mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 20:21:49 +01:00
Controllers now properly remove their toolbar items on pop
This commit is contained in:
parent
b5699154f4
commit
f4ce43787c
@ -61,6 +61,7 @@ abstract class BaseController(bundle: Bundle? = null) : RestoreViewOnCreateContr
|
|||||||
if (type.isEnter) {
|
if (type.isEnter) {
|
||||||
setTitle()
|
setTitle()
|
||||||
}
|
}
|
||||||
|
setHasOptionsMenu(type.isEnter)
|
||||||
super.onChangeStarted(handler, type)
|
super.onChangeStarted(handler, type)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -468,7 +468,6 @@ class MangaDetailsController : BaseController,
|
|||||||
if (router.backstack.lastOrNull()?.controller() is DialogController)
|
if (router.backstack.lastOrNull()?.controller() is DialogController)
|
||||||
return
|
return
|
||||||
if (type == ControllerChangeType.POP_EXIT) {
|
if (type == ControllerChangeType.POP_EXIT) {
|
||||||
setHasOptionsMenu(false)
|
|
||||||
setActionBar(false)
|
setActionBar(false)
|
||||||
presenter.cancelScope()
|
presenter.cancelScope()
|
||||||
}
|
}
|
||||||
|
@ -79,6 +79,7 @@ abstract class SettingsController : PreferenceController() {
|
|||||||
if (type.isEnter) {
|
if (type.isEnter) {
|
||||||
setTitle()
|
setTitle()
|
||||||
}
|
}
|
||||||
|
setHasOptionsMenu(type.isEnter)
|
||||||
super.onChangeStarted(handler, type)
|
super.onChangeStarted(handler, type)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user