Remove background app update check

We already check in the foreground. If the app isn't being foregrounded at all, then there isn't much
point in checking for an update.

(cherry picked from commit 42954609b94e13d8fadbf1f3769e9f32fa9e8447)

# Conflicts:
#	app/build.gradle.kts
#	app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateJob.kt
This commit is contained in:
arkon
2023-02-12 22:44:39 -05:00
committed by Jobobby04
parent 8fc9e77b77
commit a275a102e9
4 changed files with 9 additions and 88 deletions
+2 -3
View File
@@ -5,6 +5,7 @@ package exh
import android.content.Context
import androidx.core.content.edit
import androidx.preference.PreferenceManager
import androidx.work.WorkManager
import eu.kanade.domain.backup.service.BackupPreferences
import eu.kanade.domain.base.BasePreferences
import eu.kanade.domain.chapter.interactor.DeleteChapters
@@ -109,9 +110,6 @@ object EXHMigrations {
if (oldVersion < BuildConfig.VERSION_CODE) {
lastVersionCode.set(BuildConfig.VERSION_CODE)
if (BuildConfig.INCLUDE_UPDATER) {
AppUpdateJob.setupTask(context)
}
ExtensionUpdateJob.setupTask(context)
LibraryUpdateJob.setupTask(context)
BackupCreatorJob.setupTask(context)
@@ -518,6 +516,7 @@ object EXHMigrations {
if (oldVersion under 48) {
LibraryUpdateJob.cancelAllWorks(context)
LibraryUpdateJob.setupTask(context)
WorkManager.getInstance(context).cancelAllWorkByTag("UpdateChecker")
}
// if (oldVersion under 1) { } (1 is current release version)