Use system color for notifications
This commit is contained in:
@@ -92,7 +92,6 @@ class DownloadNotificationFactory @AssistedInject constructor(
|
|||||||
createChannel()
|
createChannel()
|
||||||
builder.setOnlyAlertOnce(true)
|
builder.setOnlyAlertOnce(true)
|
||||||
builder.setDefaults(0)
|
builder.setDefaults(0)
|
||||||
builder.color = ContextCompat.getColor(context, R.color.blue_primary)
|
|
||||||
builder.foregroundServiceBehavior = NotificationCompat.FOREGROUND_SERVICE_IMMEDIATE
|
builder.foregroundServiceBehavior = NotificationCompat.FOREGROUND_SERVICE_IMMEDIATE
|
||||||
builder.setSilent(true)
|
builder.setSilent(true)
|
||||||
builder.setGroup(GROUP_ID)
|
builder.setGroup(GROUP_ID)
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ class ImportWorker @AssistedInject constructor(
|
|||||||
.setContentTitle(title)
|
.setContentTitle(title)
|
||||||
.setPriority(NotificationCompat.PRIORITY_MIN)
|
.setPriority(NotificationCompat.PRIORITY_MIN)
|
||||||
.setDefaults(0)
|
.setDefaults(0)
|
||||||
.setColor(ContextCompat.getColor(applicationContext, R.color.blue_primary_dark))
|
|
||||||
.setSilent(true)
|
.setSilent(true)
|
||||||
.setProgress(0, 0, true)
|
.setProgress(0, 0, true)
|
||||||
.setSmallIcon(android.R.drawable.stat_sys_download)
|
.setSmallIcon(android.R.drawable.stat_sys_download)
|
||||||
@@ -85,7 +84,6 @@ class ImportWorker @AssistedInject constructor(
|
|||||||
val notification = NotificationCompat.Builder(applicationContext, CHANNEL_ID)
|
val notification = NotificationCompat.Builder(applicationContext, CHANNEL_ID)
|
||||||
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
|
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
|
||||||
.setDefaults(0)
|
.setDefaults(0)
|
||||||
.setColor(ContextCompat.getColor(applicationContext, R.color.blue_primary_dark))
|
|
||||||
.setSilent(true)
|
.setSilent(true)
|
||||||
result.onSuccess { manga ->
|
result.onSuccess { manga ->
|
||||||
notification.setLargeIcon(
|
notification.setLargeIcon(
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ class LocalChaptersRemoveService : CoroutineIntentService() {
|
|||||||
.setContentTitle(getString(R.string.error_occurred))
|
.setContentTitle(getString(R.string.error_occurred))
|
||||||
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
|
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
|
||||||
.setDefaults(0)
|
.setDefaults(0)
|
||||||
.setColor(ContextCompat.getColor(this, R.color.blue_primary_dark))
|
|
||||||
.setSilent(true)
|
.setSilent(true)
|
||||||
.setContentText(error.getDisplayMessage(resources))
|
.setContentText(error.getDisplayMessage(resources))
|
||||||
.setSmallIcon(android.R.drawable.stat_notify_error)
|
.setSmallIcon(android.R.drawable.stat_notify_error)
|
||||||
@@ -82,7 +81,6 @@ class LocalChaptersRemoveService : CoroutineIntentService() {
|
|||||||
.setContentTitle(title)
|
.setContentTitle(title)
|
||||||
.setPriority(NotificationCompat.PRIORITY_MIN)
|
.setPriority(NotificationCompat.PRIORITY_MIN)
|
||||||
.setDefaults(0)
|
.setDefaults(0)
|
||||||
.setColor(ContextCompat.getColor(this, R.color.blue_primary_dark))
|
|
||||||
.setSilent(true)
|
.setSilent(true)
|
||||||
.setProgress(0, 0, true)
|
.setProgress(0, 0, true)
|
||||||
.setSmallIcon(android.R.drawable.stat_notify_sync)
|
.setSmallIcon(android.R.drawable.stat_notify_sync)
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ class SuggestionsWorker @AssistedInject constructor(
|
|||||||
.setPriority(NotificationCompat.PRIORITY_MIN)
|
.setPriority(NotificationCompat.PRIORITY_MIN)
|
||||||
.setCategory(NotificationCompat.CATEGORY_SERVICE)
|
.setCategory(NotificationCompat.CATEGORY_SERVICE)
|
||||||
.setDefaults(0)
|
.setDefaults(0)
|
||||||
.setColor(ContextCompat.getColor(applicationContext, R.color.blue_primary_dark))
|
|
||||||
.setSilent(true)
|
.setSilent(true)
|
||||||
.setProgress(0, 0, true)
|
.setProgress(0, 0, true)
|
||||||
.setSmallIcon(android.R.drawable.stat_notify_sync)
|
.setSmallIcon(android.R.drawable.stat_notify_sync)
|
||||||
|
|||||||
@@ -182,7 +182,6 @@ class TrackWorker @AssistedInject constructor(
|
|||||||
setAutoCancel(true)
|
setAutoCancel(true)
|
||||||
setCategory(NotificationCompat.CATEGORY_PROMO)
|
setCategory(NotificationCompat.CATEGORY_PROMO)
|
||||||
setVisibility(if (manga.isNsfw) VISIBILITY_SECRET else VISIBILITY_PUBLIC)
|
setVisibility(if (manga.isNsfw) VISIBILITY_SECRET else VISIBILITY_PUBLIC)
|
||||||
color = colorPrimary
|
|
||||||
setShortcutId(manga.id.toString())
|
setShortcutId(manga.id.toString())
|
||||||
priority = NotificationCompat.PRIORITY_DEFAULT
|
priority = NotificationCompat.PRIORITY_DEFAULT
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
||||||
@@ -220,7 +219,6 @@ class TrackWorker @AssistedInject constructor(
|
|||||||
.setPriority(NotificationCompat.PRIORITY_MIN)
|
.setPriority(NotificationCompat.PRIORITY_MIN)
|
||||||
.setCategory(NotificationCompat.CATEGORY_SERVICE)
|
.setCategory(NotificationCompat.CATEGORY_SERVICE)
|
||||||
.setDefaults(0)
|
.setDefaults(0)
|
||||||
.setColor(ContextCompat.getColor(applicationContext, R.color.blue_primary_dark))
|
|
||||||
.setSilent(true)
|
.setSilent(true)
|
||||||
.setProgress(0, 0, true)
|
.setProgress(0, 0, true)
|
||||||
.setSmallIcon(android.R.drawable.stat_notify_sync)
|
.setSmallIcon(android.R.drawable.stat_notify_sync)
|
||||||
|
|||||||
Reference in New Issue
Block a user