mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-17 15:39:16 +01:00
Update notification icons
Although no recent version of Android even shows these....
This commit is contained in:
parent
808177f8c9
commit
ed4dea8686
@ -84,7 +84,7 @@ internal class DownloadNotifier(private val context: Context) {
|
|||||||
fun onProgressChange(download: Download) {
|
fun onProgressChange(download: Download) {
|
||||||
with(progressNotificationBuilder) {
|
with(progressNotificationBuilder) {
|
||||||
if (!isDownloading) {
|
if (!isDownloading) {
|
||||||
setSmallIcon(android.R.drawable.stat_sys_download)
|
setSmallIcon(R.drawable.ic_photo_24dp)
|
||||||
clearActions()
|
clearActions()
|
||||||
// Open download manager when clicked
|
// Open download manager when clicked
|
||||||
setContentIntent(NotificationHandler.openDownloadManagerPendingActivity(context))
|
setContentIntent(NotificationHandler.openDownloadManagerPendingActivity(context))
|
||||||
@ -165,7 +165,7 @@ internal class DownloadNotifier(private val context: Context) {
|
|||||||
with(completeNotificationBuilder) {
|
with(completeNotificationBuilder) {
|
||||||
setContentTitle(context.getString(R.string.download_notifier_downloader_title))
|
setContentTitle(context.getString(R.string.download_notifier_downloader_title))
|
||||||
setContentText(context.getString(R.string.download_notifier_download_finish))
|
setContentText(context.getString(R.string.download_notifier_download_finish))
|
||||||
setSmallIcon(android.R.drawable.stat_sys_download_done)
|
setSmallIcon(R.drawable.ic_download_24dp)
|
||||||
clearActions()
|
clearActions()
|
||||||
setAutoCancel(true)
|
setAutoCancel(true)
|
||||||
setContentIntent(NotificationHandler.openDownloadManagerPendingActivity(context))
|
setContentIntent(NotificationHandler.openDownloadManagerPendingActivity(context))
|
||||||
|
@ -39,12 +39,12 @@ internal class AppUpdateNotifier(private val context: Context) {
|
|||||||
|
|
||||||
with(notificationBuilder) {
|
with(notificationBuilder) {
|
||||||
setContentTitle(context.getString(R.string.update_check_notification_update_available))
|
setContentTitle(context.getString(R.string.update_check_notification_update_available))
|
||||||
setSmallIcon(android.R.drawable.stat_sys_download_done)
|
setSmallIcon(R.drawable.ic_download_24dp)
|
||||||
setContentIntent(updateIntent)
|
setContentIntent(updateIntent)
|
||||||
|
|
||||||
clearActions()
|
clearActions()
|
||||||
addAction(
|
addAction(
|
||||||
android.R.drawable.stat_sys_download_done,
|
R.drawable.ic_download_24dp,
|
||||||
context.getString(R.string.action_download),
|
context.getString(R.string.action_download),
|
||||||
updateIntent,
|
updateIntent,
|
||||||
)
|
)
|
||||||
@ -66,7 +66,7 @@ internal class AppUpdateNotifier(private val context: Context) {
|
|||||||
with(notificationBuilder) {
|
with(notificationBuilder) {
|
||||||
title?.let { setContentTitle(title) }
|
title?.let { setContentTitle(title) }
|
||||||
setContentText(context.getString(R.string.update_check_notification_download_in_progress))
|
setContentText(context.getString(R.string.update_check_notification_download_in_progress))
|
||||||
setSmallIcon(android.R.drawable.stat_sys_download)
|
setSmallIcon(R.drawable.ic_photo_24dp)
|
||||||
setOngoing(true)
|
setOngoing(true)
|
||||||
}
|
}
|
||||||
notificationBuilder.show()
|
notificationBuilder.show()
|
||||||
@ -95,7 +95,7 @@ internal class AppUpdateNotifier(private val context: Context) {
|
|||||||
val installIntent = NotificationHandler.installApkPendingActivity(context, uri)
|
val installIntent = NotificationHandler.installApkPendingActivity(context, uri)
|
||||||
with(notificationBuilder) {
|
with(notificationBuilder) {
|
||||||
setContentText(context.getString(R.string.update_check_notification_download_complete))
|
setContentText(context.getString(R.string.update_check_notification_download_complete))
|
||||||
setSmallIcon(android.R.drawable.stat_sys_download_done)
|
setSmallIcon(R.drawable.ic_download_24dp)
|
||||||
setOnlyAlertOnce(false)
|
setOnlyAlertOnce(false)
|
||||||
setProgress(0, 0, false)
|
setProgress(0, 0, false)
|
||||||
setContentIntent(installIntent)
|
setContentIntent(installIntent)
|
||||||
|
@ -103,7 +103,7 @@ class SaveImageNotifier(private val context: Context) {
|
|||||||
with(notificationBuilder) {
|
with(notificationBuilder) {
|
||||||
setContentTitle(context.getString(R.string.download_notifier_title_error))
|
setContentTitle(context.getString(R.string.download_notifier_title_error))
|
||||||
setContentText(error ?: context.getString(R.string.unknown_error))
|
setContentText(error ?: context.getString(R.string.unknown_error))
|
||||||
setSmallIcon(android.R.drawable.ic_menu_report_image)
|
setSmallIcon(R.drawable.ic_error_outline_24dp)
|
||||||
}
|
}
|
||||||
updateNotification()
|
updateNotification()
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
android:viewportWidth="24"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="24">
|
android:viewportHeight="24">
|
||||||
<path
|
<path
|
||||||
android:fillColor="@android:color/white"
|
android:fillColor="@android:color/black"
|
||||||
android:pathData="M9,3v6L5,9l7,7 7,-7h-4L15,3zM19,18L5,18v2h14v-2z" />
|
android:pathData="M9,3v6L5,9l7,7 7,-7h-4L15,3zM19,18L5,18v2h14v-2z" />
|
||||||
</vector>
|
</vector>
|
||||||
|
Loading…
Reference in New Issue
Block a user