mirror of
https://github.com/null2264/yokai.git
synced 2025-06-20 18:24:42 +00:00
fix: Handle update checker separately for AboutController for noe
This commit is contained in:
parent
49b10c1b4f
commit
a554c079fb
1 changed files with 3 additions and 7 deletions
|
@ -1001,7 +1001,8 @@ open class MainActivity : BaseActivity<MainActivityBinding>() {
|
|||
}
|
||||
|
||||
private fun checkForAppUpdates() {
|
||||
if (isUpdaterEnabled) {
|
||||
// FIXME: Show Compose version of NewUpdateDialog for AboutController
|
||||
if (isUpdaterEnabled && router.backstack.lastOrNull()?.controller !is AboutController) {
|
||||
lifecycleScope.launchIO {
|
||||
try {
|
||||
val result = updateChecker.checkForUpdate(this@MainActivity)
|
||||
|
@ -1014,12 +1015,7 @@ open class MainActivity : BaseActivity<MainActivityBinding>() {
|
|||
withContext(Dispatchers.Main) {
|
||||
showNotificationPermissionPrompt()
|
||||
AppUpdateNotifier.releasePageUrl = result.release.releaseLink
|
||||
if (
|
||||
// FIXME: Show Compose version of NewUpdateDialog for AboutController
|
||||
router.backstack.lastOrNull()?.controller !is AboutController
|
||||
) {
|
||||
AboutController.NewUpdateDialogController(body, url, isBeta).showDialog(router)
|
||||
}
|
||||
AboutController.NewUpdateDialogController(body, url, isBeta).showDialog(router)
|
||||
}
|
||||
}
|
||||
} catch (error: Exception) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue