mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 02:34:39 +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() {
|
private fun checkForAppUpdates() {
|
||||||
if (isUpdaterEnabled) {
|
// FIXME: Show Compose version of NewUpdateDialog for AboutController
|
||||||
|
if (isUpdaterEnabled && router.backstack.lastOrNull()?.controller !is AboutController) {
|
||||||
lifecycleScope.launchIO {
|
lifecycleScope.launchIO {
|
||||||
try {
|
try {
|
||||||
val result = updateChecker.checkForUpdate(this@MainActivity)
|
val result = updateChecker.checkForUpdate(this@MainActivity)
|
||||||
|
@ -1014,12 +1015,7 @@ open class MainActivity : BaseActivity<MainActivityBinding>() {
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
showNotificationPermissionPrompt()
|
showNotificationPermissionPrompt()
|
||||||
AppUpdateNotifier.releasePageUrl = result.release.releaseLink
|
AppUpdateNotifier.releasePageUrl = result.release.releaseLink
|
||||||
if (
|
AboutController.NewUpdateDialogController(body, url, isBeta).showDialog(router)
|
||||||
// FIXME: Show Compose version of NewUpdateDialog for AboutController
|
|
||||||
router.backstack.lastOrNull()?.controller !is AboutController
|
|
||||||
) {
|
|
||||||
AboutController.NewUpdateDialogController(body, url, isBeta).showDialog(router)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error: Exception) {
|
} catch (error: Exception) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue