mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-24 05:38:01 +03:00
Fix crash in Extension Detail and set ready to true on Library screen (#7591)
This commit is contained in:
parent
07c9af4901
commit
978489fade
2 changed files with 9 additions and 1 deletions
|
@ -10,6 +10,7 @@ import eu.kanade.tachiyomi.extension.ExtensionManager
|
||||||
import eu.kanade.tachiyomi.source.Source
|
import eu.kanade.tachiyomi.source.Source
|
||||||
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter
|
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter
|
||||||
import eu.kanade.tachiyomi.util.lang.launchIO
|
import eu.kanade.tachiyomi.util.lang.launchIO
|
||||||
|
import eu.kanade.tachiyomi.util.lang.launchUI
|
||||||
import eu.kanade.tachiyomi.util.system.LocaleHelper
|
import eu.kanade.tachiyomi.util.system.LocaleHelper
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.flow.collectLatest
|
import kotlinx.coroutines.flow.collectLatest
|
||||||
|
@ -70,7 +71,9 @@ class ExtensionDetailsPresenter(
|
||||||
.map { }
|
.map { }
|
||||||
.take(1)
|
.take(1)
|
||||||
.collectLatest {
|
.collectLatest {
|
||||||
view?.onExtensionUninstalled()
|
launchUI {
|
||||||
|
view?.onExtensionUninstalled()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,11 @@ class LibraryController(
|
||||||
val activity = (activity as? MainActivity) ?: return@LaunchedEffect
|
val activity = (activity as? MainActivity) ?: return@LaunchedEffect
|
||||||
activity.showBottomNav(presenter.selectionMode.not())
|
activity.showBottomNav(presenter.selectionMode.not())
|
||||||
}
|
}
|
||||||
|
LaunchedEffect(presenter.isLoading) {
|
||||||
|
if (presenter.isLoading.not()) {
|
||||||
|
(activity as? MainActivity)?.ready = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun handleBack(): Boolean {
|
override fun handleBack(): Boolean {
|
||||||
|
|
Loading…
Reference in a new issue