Skip to content

Commit

Permalink
fix: Handle update checker separately for AboutController for noe
Browse files Browse the repository at this point in the history
  • Loading branch information
null2264 committed Jan 2, 2025
1 parent 49b10c1 commit a554c07
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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) {
Expand Down

0 comments on commit a554c07

Please sign in to comment.