Tweak the app updater logic and add FOSS build support (#1843)
This commit is contained in:
@@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.data.updater
|
||||
|
||||
import android.content.Context
|
||||
import eu.kanade.tachiyomi.BuildConfig
|
||||
import eu.kanade.tachiyomi.util.system.isFossBuildType
|
||||
import eu.kanade.tachiyomi.util.system.isPreviewBuildType
|
||||
import tachiyomi.core.common.util.lang.withIOContext
|
||||
import tachiyomi.domain.release.interactor.GetApplicationRelease
|
||||
@@ -20,6 +21,7 @@ class AppUpdateChecker {
|
||||
return withIOContext {
|
||||
val result = getApplicationRelease.await(
|
||||
GetApplicationRelease.Arguments(
|
||||
isFossBuildType,
|
||||
isPreviewBuildType,
|
||||
BuildConfig.COMMIT_COUNT.toInt(),
|
||||
BuildConfig.VERSION_NAME,
|
||||
|
||||
@@ -38,7 +38,7 @@ internal class AppUpdateNotifier(private val context: Context) {
|
||||
fun promptUpdate(release: Release) {
|
||||
val updateIntent = NotificationReceiver.downloadAppUpdatePendingBroadcast(
|
||||
context,
|
||||
release.getDownloadLink(),
|
||||
release.downloadLink,
|
||||
release.version,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user