mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 02:34:39 +00:00
style: Finally use my own logo for notifications
This commit is contained in:
parent
d91085b8f3
commit
fba2a3805c
5 changed files with 11 additions and 8 deletions
|
@ -10,6 +10,9 @@
|
|||
## Additions
|
||||
- (Experimental) Option to append chapter ID to download filename to avoid conflict
|
||||
|
||||
## Changes
|
||||
- Changed notification icon to use Yōkai's logo instead
|
||||
|
||||
## Fixes
|
||||
- Fixed not being able to open different chapter if another chapter is opened
|
||||
|
||||
|
|
|
@ -21,14 +21,14 @@ class BackupNotifier(private val context: Context) {
|
|||
|
||||
private val progressNotificationBuilder = context.notificationBuilder(Notifications.CHANNEL_BACKUP_RESTORE_PROGRESS) {
|
||||
setLargeIcon(BitmapFactory.decodeResource(context.resources, R.mipmap.ic_launcher))
|
||||
setSmallIcon(R.drawable.ic_tachij2k_notification)
|
||||
setSmallIcon(R.drawable.ic_yokai)
|
||||
setAutoCancel(false)
|
||||
setOngoing(true)
|
||||
}
|
||||
|
||||
private val completeNotificationBuilder = context.notificationBuilder(Notifications.CHANNEL_BACKUP_RESTORE_COMPLETE) {
|
||||
setLargeIcon(BitmapFactory.decodeResource(context.resources, R.mipmap.ic_launcher))
|
||||
setSmallIcon(R.drawable.ic_tachij2k_notification)
|
||||
setSmallIcon(R.drawable.ic_yokai)
|
||||
setAutoCancel(false)
|
||||
}
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ class LibraryUpdateNotifier(private val context: Context) {
|
|||
),
|
||||
)
|
||||
setContentIntent(pendingIntent)
|
||||
setSmallIcon(R.drawable.ic_tachij2k_notification)
|
||||
setSmallIcon(R.drawable.ic_yokai)
|
||||
addAction(
|
||||
R.drawable.ic_file_open_24dp,
|
||||
context.getString(R.string.open_log),
|
||||
|
@ -149,7 +149,7 @@ class LibraryUpdateNotifier(private val context: Context) {
|
|||
),
|
||||
)
|
||||
setContentIntent(NotificationHandler.openUrl(context, HELP_SKIPPED_URL))
|
||||
setSmallIcon(R.drawable.ic_tachij2k_notification)
|
||||
setSmallIcon(R.drawable.ic_yokai)
|
||||
addAction(
|
||||
R.drawable.ic_file_open_24dp,
|
||||
context.getString(R.string.open_log),
|
||||
|
@ -186,7 +186,7 @@ class LibraryUpdateNotifier(private val context: Context) {
|
|||
notifications.add(
|
||||
Pair(
|
||||
context.notification(Notifications.CHANNEL_NEW_CHAPTERS) {
|
||||
setSmallIcon(R.drawable.ic_tachij2k_notification)
|
||||
setSmallIcon(R.drawable.ic_yokai)
|
||||
try {
|
||||
val request = ImageRequest.Builder(context).data(manga)
|
||||
.networkCachePolicy(CachePolicy.DISABLED)
|
||||
|
@ -260,7 +260,7 @@ class LibraryUpdateNotifier(private val context: Context) {
|
|||
notify(
|
||||
Notifications.ID_NEW_CHAPTERS,
|
||||
context.notification(Notifications.CHANNEL_NEW_CHAPTERS) {
|
||||
setSmallIcon(R.drawable.ic_tachij2k_notification)
|
||||
setSmallIcon(R.drawable.ic_yokai)
|
||||
setLargeIcon(notificationBitmap)
|
||||
setContentTitle(context.getString(R.string.new_chapters_found))
|
||||
color = ContextCompat.getColor(context, R.color.secondaryTachiyomi)
|
||||
|
|
|
@ -189,7 +189,7 @@ internal class AppUpdateNotifier(private val context: Context) {
|
|||
with(NotificationCompat.Builder(context, Notifications.CHANNEL_UPDATED)) {
|
||||
setContentTitle(context.getString(R.string.update_completed))
|
||||
setContentText(context.getString(R.string.updated_to_, BuildConfig.VERSION_NAME))
|
||||
setSmallIcon(R.drawable.ic_tachij2k_notification)
|
||||
setSmallIcon(R.drawable.ic_yokai)
|
||||
setAutoCancel(true)
|
||||
setOngoing(false)
|
||||
setProgress(0, 0, false)
|
||||
|
|
|
@ -22,7 +22,7 @@ import java.io.IOException
|
|||
class CrashLogUtil(private val context: Context) {
|
||||
|
||||
private val notificationBuilder = context.notificationBuilder(Notifications.CHANNEL_CRASH_LOGS) {
|
||||
setSmallIcon(R.drawable.ic_tachij2k_notification)
|
||||
setSmallIcon(R.drawable.ic_yokai)
|
||||
}
|
||||
|
||||
suspend fun dumpLogs() = withNonCancellableContext {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue