diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/BaseController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/BaseController.kt index 18bf71abf..9003b2ce3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/BaseController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/BaseController.kt @@ -23,6 +23,8 @@ abstract class BaseController(bundle: Bundle? = null) : Contro lateinit var viewScope: CoroutineScope init { + retainViewMode = RetainViewMode.RETAIN_DETACH + addLifecycleListener( object : LifecycleListener() { override fun postCreateView(controller: Controller, view: View) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index 4001d1d21..a1f9553f0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt @@ -40,10 +40,6 @@ class LibraryController( */ private var settingsSheet: LibrarySettingsSheet? = null - init { - retainViewMode = RetainViewMode.RETAIN_DETACH - } - override fun createPresenter(): LibraryPresenter = LibraryPresenter() @Composable