Add an artificial delay so SourceManager can add ExHentai
This commit is contained in:
parent
4b338507b6
commit
9a55b70d91
@ -20,9 +20,11 @@ import exh.log.xLogE
|
|||||||
import exh.uconfig.EHConfigurator
|
import exh.uconfig.EHConfigurator
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.NonCancellable
|
import kotlinx.coroutines.NonCancellable
|
||||||
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
import uy.kohesive.injekt.api.get
|
import uy.kohesive.injekt.api.get
|
||||||
|
import kotlin.time.Duration.Companion.seconds
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun ConfigureExhDialog(run: Boolean, onRunning: () -> Unit) {
|
fun ConfigureExhDialog(run: Boolean, onRunning: () -> Unit) {
|
||||||
@ -75,6 +77,7 @@ fun ConfigureExhDialog(run: Boolean, onRunning: () -> Unit) {
|
|||||||
LaunchedEffect(Unit) {
|
LaunchedEffect(Unit) {
|
||||||
withContext(Dispatchers.IO + NonCancellable) {
|
withContext(Dispatchers.IO + NonCancellable) {
|
||||||
try {
|
try {
|
||||||
|
delay(0.2.seconds)
|
||||||
EHConfigurator(context).configureAll()
|
EHConfigurator(context).configureAll()
|
||||||
launchUI {
|
launchUI {
|
||||||
context.toast(R.string.eh_settings_successfully_uploaded)
|
context.toast(R.string.eh_settings_successfully_uploaded)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user