Code Review for UI Rewrite

This commit is contained in:
2026-05-21 00:38:27 +10:00
parent 630154ed78
commit c95bb0633f
10 changed files with 66 additions and 26 deletions
@@ -26,6 +26,7 @@ import com.meowarex.rlmobile.ui.screens.settings.SettingsModel
import com.meowarex.rlmobile.ui.widgets.updater.UpdaterViewModel
import com.meowarex.rlmobile.updatechecker.UpdateCheckWorker
import kotlinx.coroutines.Dispatchers
import org.koin.android.ext.android.get
import org.koin.android.ext.koin.androidContext
import org.koin.core.context.startKoin
import org.koin.core.module.dsl.*
@@ -101,7 +102,12 @@ class ManagerApplication : Application() {
.build()
}
// Schedule periodic update check
UpdateCheckWorker.schedule(this)
// Schedule periodic update check only when the user has opted in,
// so the disabled state survives app restarts instead of being re-enqueued.
if (get<PreferencesManager>().autoUpdateCheck) {
UpdateCheckWorker.schedule(this)
} else {
UpdateCheckWorker.cancel(this)
}
}
}