Remove background extensions updates check

Same reasoning as removing app update check. It gets kicked off in the foreground now too.
This commit is contained in:
arkon
2023-02-12 23:07:11 -05:00
parent 42954609b9
commit 2970eca9e4
8 changed files with 67 additions and 123 deletions

View File

@@ -71,6 +71,7 @@ import eu.kanade.tachiyomi.data.notification.NotificationReceiver
import eu.kanade.tachiyomi.data.updater.AppUpdateChecker
import eu.kanade.tachiyomi.data.updater.AppUpdateResult
import eu.kanade.tachiyomi.data.updater.RELEASE_URL
import eu.kanade.tachiyomi.extension.api.ExtensionGithubApi
import eu.kanade.tachiyomi.ui.base.activity.BaseActivity
import eu.kanade.tachiyomi.ui.browse.source.browse.BrowseSourceScreen
import eu.kanade.tachiyomi.ui.browse.source.globalsearch.GlobalSearchScreen
@@ -256,7 +257,7 @@ class MainActivity : BaseActivity() {
.launchIn(this)
}
CheckForUpdate()
CheckForUpdates()
}
var showChangelog by remember { mutableStateOf(didMigration && !BuildConfig.DEBUG) }
@@ -320,11 +321,12 @@ class MainActivity : BaseActivity() {
}
@Composable
private fun CheckForUpdate() {
private fun CheckForUpdates() {
val context = LocalContext.current
val navigator = LocalNavigator.currentOrThrow
// App updates
LaunchedEffect(Unit) {
// App updates
if (BuildConfig.INCLUDE_UPDATER) {
try {
val result = AppUpdateChecker().checkForUpdate(context)
@@ -342,6 +344,15 @@ class MainActivity : BaseActivity() {
}
}
}
// Extensions updates
LaunchedEffect(Unit) {
try {
ExtensionGithubApi().checkForUpdates(context)
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
}
}
}
/**