Manga updates notifcations no longer make a sound, only group notication

For those who own a device that makes a million sounds at once, or for those who want to see all their mangos + fixed coloring of restore notifcation
This commit is contained in:
Jay 2020-01-11 01:10:15 -08:00
parent f297b74682
commit f8aa4d8fb8
2 changed files with 4 additions and 2 deletions

View File

@ -342,7 +342,7 @@ class BackupRestoreService : Service() {
.setOngoing(true)
.setOnlyAlertOnce(true)
.setAutoCancel(false)
.setColor(ContextCompat.getColor(this, R.color.colorAccent))
.setColor(ContextCompat.getColor(this, R.color.colorAccentLight))
.addAction(R.drawable.ic_clear_grey_24dp_img, getString(android.R.string.cancel), cancelIntent)
}
@ -396,7 +396,7 @@ class BackupRestoreService : Service() {
.setStyle(NotificationCompat.BigTextStyle().bigText(restoreString))
.setSmallIcon(R.drawable.ic_tachi)
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setColor(ContextCompat.getColor(this, R.color.colorAccent))
.setColor(ContextCompat.getColor(this, R.color.colorAccentLight))
if (errors.size > 0 && !path.isNullOrEmpty() && !file.isNullOrEmpty()) {
resultNotification.addAction(R.drawable.ic_clear_grey_24dp_img, getString(R.string
.notification_action_error_log), getErrorLogIntent(path, file))

View File

@ -10,6 +10,7 @@ import android.os.Build
import android.os.IBinder
import android.os.PowerManager
import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationCompat.GROUP_ALERT_SUMMARY
import androidx.core.app.NotificationManagerCompat
import androidx.core.content.ContextCompat
import eu.kanade.tachiyomi.R
@ -485,6 +486,7 @@ class LibraryUpdateService(
setLargeIcon(icon)
}
catch (e: Exception) { }
setGroupAlertBehavior(GROUP_ALERT_SUMMARY)
setContentTitle(manga.title)
color = ContextCompat.getColor(this@LibraryUpdateService, R.color.colorAccentLight)
val chaptersNames = if (chapterNames.size > 5) {