mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-11 19:10:48 +01:00
Cancel library progress notification after posting the result
This commit is contained in:
parent
e9a6f8ef46
commit
8ef3ab0d49
1 changed files with 6 additions and 4 deletions
|
@ -289,7 +289,6 @@ class LibraryUpdateService(
|
||||||
}
|
}
|
||||||
// Notify result of the overall update.
|
// Notify result of the overall update.
|
||||||
.doOnCompleted {
|
.doOnCompleted {
|
||||||
cancelProgressNotification()
|
|
||||||
if (newUpdates.isNotEmpty()) {
|
if (newUpdates.isNotEmpty()) {
|
||||||
showResultNotification(newUpdates)
|
showResultNotification(newUpdates)
|
||||||
if (downloadNew && hasDownloads) {
|
if (downloadNew && hasDownloads) {
|
||||||
|
@ -300,6 +299,8 @@ class LibraryUpdateService(
|
||||||
if (failedUpdates.isNotEmpty()) {
|
if (failedUpdates.isNotEmpty()) {
|
||||||
Timber.e("Failed updating: ${failedUpdates.map { it.title }}")
|
Timber.e("Failed updating: ${failedUpdates.map { it.title }}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cancelProgressNotification()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -389,10 +390,11 @@ class LibraryUpdateService(
|
||||||
|
|
||||||
if (previousNotification != null) {
|
if (previousNotification != null) {
|
||||||
val oldUpdates = previousNotification.notification.extras
|
val oldUpdates = previousNotification.notification.extras
|
||||||
.getString(Notification.EXTRA_BIG_TEXT, "")
|
.getString(Notification.EXTRA_BIG_TEXT)
|
||||||
.split("\n")
|
|
||||||
|
|
||||||
newUpdates += oldUpdates
|
if (!oldUpdates.isNullOrEmpty()) {
|
||||||
|
newUpdates += oldUpdates.split("\n")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue