Clean up UpdatesController

- Move loading state into scaffold (closes #7704)
- Move logic into presenter
- Make some composables private
This commit is contained in:
arkon
2022-09-18 22:38:44 -04:00
parent f85cbb1582
commit 0e3176a77c
14 changed files with 159 additions and 155 deletions
@@ -95,14 +95,13 @@ class LibraryController(
}
LaunchedEffect(presenter.selectionMode) {
val activity = (activity as? MainActivity) ?: return@LaunchedEffect
// Could perhaps be removed when navigation is in a Compose world
if (router.backstackSize == 1) {
activity.showBottomNav(presenter.selectionMode.not())
(activity as? MainActivity)?.showBottomNav(presenter.selectionMode.not())
}
}
LaunchedEffect(presenter.isLoading) {
if (presenter.isLoading.not()) {
if (!presenter.isLoading) {
(activity as? MainActivity)?.ready = true
}
}