mirror of
https://github.com/mihonapp/mihon.git
synced 2024-12-25 02:18:24 +01:00
No-op app update checks for Android < 8
This effectively makes it the last release for the older Android versions.
This commit is contained in:
parent
c5e8c9f01f
commit
db20d04c4b
@ -1,6 +1,7 @@
|
|||||||
package eu.kanade.tachiyomi.data.updater
|
package eu.kanade.tachiyomi.data.updater
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.os.Build
|
||||||
import eu.kanade.tachiyomi.BuildConfig
|
import eu.kanade.tachiyomi.BuildConfig
|
||||||
import eu.kanade.tachiyomi.util.system.isInstalledFromFDroid
|
import eu.kanade.tachiyomi.util.system.isInstalledFromFDroid
|
||||||
import tachiyomi.core.util.lang.withIOContext
|
import tachiyomi.core.util.lang.withIOContext
|
||||||
@ -12,6 +13,11 @@ class AppUpdateChecker {
|
|||||||
private val getApplicationRelease: GetApplicationRelease by injectLazy()
|
private val getApplicationRelease: GetApplicationRelease by injectLazy()
|
||||||
|
|
||||||
suspend fun checkForUpdate(context: Context, forceCheck: Boolean = false): GetApplicationRelease.Result {
|
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 withIOContext {
|
return withIOContext {
|
||||||
val result = getApplicationRelease.await(
|
val result = getApplicationRelease.await(
|
||||||
GetApplicationRelease.Arguments(
|
GetApplicationRelease.Arguments(
|
||||||
|
Loading…
Reference in New Issue
Block a user