mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-21 11:41:48 +01:00
Show EOL message if update check no-ops due to unsupported Android version
This commit is contained in:
parent
db20d04c4b
commit
3a15c6b843
@ -228,6 +228,9 @@ object AboutScreen : Screen() {
|
||||
is GetApplicationRelease.Result.NoNewUpdate -> {
|
||||
context.toast(R.string.update_check_no_new_updates)
|
||||
}
|
||||
is GetApplicationRelease.Result.OsTooOld -> {
|
||||
context.toast(R.string.update_check_eol)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
|
@ -15,7 +15,7 @@ class AppUpdateChecker {
|
||||
suspend fun checkForUpdate(context: Context, forceCheck: Boolean = false): GetApplicationRelease.Result {
|
||||
// Disabling app update checks for older Android versions that we're going to drop support for
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
|
||||
return GetApplicationRelease.Result.NoNewUpdate
|
||||
return GetApplicationRelease.Result.OsTooOld
|
||||
}
|
||||
|
||||
return withIOContext {
|
||||
|
@ -87,6 +87,7 @@ class GetApplicationRelease(
|
||||
sealed interface Result {
|
||||
data class NewUpdate(val release: Release) : Result
|
||||
data object NoNewUpdate : Result
|
||||
data object OsTooOld : Result
|
||||
data object ThirdPartyInstallation : Result
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user