diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.kt b/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.kt
index 242835f380..8d13b89281 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.kt
@@ -29,6 +29,7 @@ internal class AppUpdateNotifier(private val context: Context) {
fun promptUpdate(release: GithubRelease) {
val intent = Intent(context, AppUpdateService::class.java).apply {
putExtra(AppUpdateService.EXTRA_DOWNLOAD_URL, release.getDownloadLink())
+ putExtra(AppUpdateService.EXTRA_DOWNLOAD_TITLE, release.version)
}
val updateIntent = PendingIntent.getService(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT)
@@ -116,6 +117,7 @@ internal class AppUpdateNotifier(private val context: Context) {
setOnlyAlertOnce(false)
setProgress(0, 0, false)
setContentIntent(installIntent)
+ setOngoing(true)
clearActions()
addAction(
diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateService.kt
index 470151116a..5a8808fcca 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateService.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateService.kt
@@ -147,7 +147,7 @@ class AppUpdateService : Service() {
* @param context the application context.
* @param url the url to the new update.
*/
- fun start(context: Context, url: String, title: String = context.getString(R.string.app_name)) {
+ fun start(context: Context, url: String, title: String? = context.getString(R.string.app_name)) {
if (!isRunning(context)) {
val intent = Intent(context, AppUpdateService::class.java).apply {
putExtra(EXTRA_DOWNLOAD_TITLE, title)
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/more/NewUpdateDialogController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/more/NewUpdateDialogController.kt
index 01053d5deb..b7bca75a79 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/more/NewUpdateDialogController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/more/NewUpdateDialogController.kt
@@ -19,6 +19,7 @@ class NewUpdateDialogController(bundle: Bundle? = null) : DialogController(bundl
constructor(update: AppUpdateResult.NewUpdate) : this(
bundleOf(
BODY_KEY to update.release.info,
+ VERSION_KEY to update.release.version,
RELEASE_URL_KEY to update.release.releaseLink,
DOWNLOAD_URL_KEY to update.release.getDownloadLink(),
),
@@ -36,7 +37,8 @@ class NewUpdateDialogController(bundle: Bundle? = null) : DialogController(bundl
applicationContext?.let { context ->
// Start download
val url = args.getString(DOWNLOAD_URL_KEY)!!
- AppUpdateService.start(context, url)
+ val version = args.getString(VERSION_KEY)
+ AppUpdateService.start(context, url, version)
}
}
.setNeutralButton(R.string.update_check_open) { _, _ ->
@@ -55,5 +57,6 @@ class NewUpdateDialogController(bundle: Bundle? = null) : DialogController(bundl
}
private const val BODY_KEY = "NewUpdateDialogController.body"
+private const val VERSION_KEY = "NewUpdateDialogController.version"
private const val RELEASE_URL_KEY = "NewUpdateDialogController.release_url"
private const val DOWNLOAD_URL_KEY = "NewUpdateDialogController.download_url"
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index d7cbf76905..4a8290573b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -777,7 +777,7 @@
Downloading…
- Download complete
+ Tap to install
Download error
New version available!
A new version is available from the official releases. Tap to learn how to migrate from unofficial F-Droid releases.