From 7258b05a3ce2eb0e145dd39f3a04f6265c616e24 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 7 Mar 2025 14:21:09 +0100 Subject: [PATCH] Rename ic_notification_small to ic_notification --- .../notifications/RingingCallNotificationCreator.kt | 2 +- .../call/impl/services/CallForegroundService.kt | 2 +- .../libraries/designsystem/icons/IconsList.kt | 2 +- ...ic_notification_small.xml => ic_notification.xml} | 0 .../notifications/factories/NotificationCreator.kt | 12 ++++++------ 5 files changed, 9 insertions(+), 9 deletions(-) rename libraries/designsystem/src/main/res/drawable/{ic_notification_small.xml => ic_notification.xml} (100%) diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt index 8345ced619..de31b0b02b 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt @@ -110,7 +110,7 @@ class RingingCallNotificationCreator @Inject constructor( ) return NotificationCompat.Builder(context, notificationChannelId) - .setSmallIcon(CommonDrawables.ic_notification_small) + .setSmallIcon(CommonDrawables.ic_notification) .setPriority(NotificationCompat.PRIORITY_MAX) .setCategory(NotificationCompat.CATEGORY_CALL) .setStyle(NotificationCompat.CallStyle.forIncomingCall(caller, declineIntent, answerIntent).setIsVideo(true)) diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/services/CallForegroundService.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/services/CallForegroundService.kt index dc4541b277..42c2e19b56 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/services/CallForegroundService.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/services/CallForegroundService.kt @@ -67,7 +67,7 @@ class CallForegroundService : Service() { val callActivityIntent = Intent(this, ElementCallActivity::class.java) val pendingIntent = PendingIntentCompat.getActivity(this, 0, callActivityIntent, 0, false) val notification = NotificationCompat.Builder(this, foregroundServiceChannel.id) - .setSmallIcon(IconCompat.createWithResource(this, CommonDrawables.ic_notification_small)) + .setSmallIcon(IconCompat.createWithResource(this, CommonDrawables.ic_notification)) .setContentTitle(getString(R.string.call_foreground_service_title_android)) .setContentText(getString(R.string.call_foreground_service_message_android)) .setContentIntent(pendingIntent) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsList.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsList.kt index f13a75a317..ff98ab5b1e 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsList.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsList.kt @@ -12,7 +12,7 @@ import io.element.android.libraries.designsystem.R // This list and all the drawable it contains should be removed at some point. // All the icons should be defined in Compound. internal val iconsOther = listOf( - R.drawable.ic_notification_small, + R.drawable.ic_notification, R.drawable.ic_stop, R.drawable.pin, ) diff --git a/libraries/designsystem/src/main/res/drawable/ic_notification_small.xml b/libraries/designsystem/src/main/res/drawable/ic_notification.xml similarity index 100% rename from libraries/designsystem/src/main/res/drawable/ic_notification_small.xml rename to libraries/designsystem/src/main/res/drawable/ic_notification.xml diff --git a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/factories/NotificationCreator.kt b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/factories/NotificationCreator.kt index 56c0a45fd5..f8cf2836b8 100755 --- a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/factories/NotificationCreator.kt +++ b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/factories/NotificationCreator.kt @@ -119,7 +119,7 @@ class DefaultNotificationCreator @Inject constructor( else -> pendingIntentFactory.createOpenRoomPendingIntent(roomInfo.sessionId, roomInfo.roomId) } - val smallIcon = CommonDrawables.ic_notification_small + val smallIcon = CommonDrawables.ic_notification val containsMissedCall = events.any { it.type == EventType.CALL_NOTIFY } val channelId = if (containsMissedCall) { @@ -219,7 +219,7 @@ class DefaultNotificationCreator @Inject constructor( override fun createRoomInvitationNotification( inviteNotifiableEvent: InviteNotifiableEvent ): Notification { - val smallIcon = CommonDrawables.ic_notification_small + val smallIcon = CommonDrawables.ic_notification val channelId = notificationChannels.getChannelIdForMessage(inviteNotifiableEvent.noisy) return NotificationCompat.Builder(context, channelId) .setOnlyAlertOnce(true) @@ -261,7 +261,7 @@ class DefaultNotificationCreator @Inject constructor( override fun createSimpleEventNotification( simpleNotifiableEvent: SimpleNotifiableEvent, ): Notification { - val smallIcon = CommonDrawables.ic_notification_small + val smallIcon = CommonDrawables.ic_notification val channelId = notificationChannels.getChannelIdForMessage(simpleNotifiableEvent.noisy) return NotificationCompat.Builder(context, channelId) @@ -294,7 +294,7 @@ class DefaultNotificationCreator @Inject constructor( override fun createFallbackNotification( fallbackNotifiableEvent: FallbackNotifiableEvent, ): Notification { - val smallIcon = CommonDrawables.ic_notification_small + val smallIcon = CommonDrawables.ic_notification val channelId = notificationChannels.getChannelIdForMessage(false) return NotificationCompat.Builder(context, channelId) @@ -330,7 +330,7 @@ class DefaultNotificationCreator @Inject constructor( noisy: Boolean, lastMessageTimestamp: Long ): Notification { - val smallIcon = CommonDrawables.ic_notification_small + val smallIcon = CommonDrawables.ic_notification val channelId = notificationChannels.getChannelIdForMessage(noisy) return NotificationCompat.Builder(context, channelId) .setOnlyAlertOnce(true) @@ -367,7 +367,7 @@ class DefaultNotificationCreator @Inject constructor( return NotificationCompat.Builder(context, notificationChannels.getChannelIdForTest()) .setContentTitle(buildMeta.applicationName) .setContentText(stringProvider.getString(R.string.notification_test_push_notification_content)) - .setSmallIcon(CommonDrawables.ic_notification_small) + .setSmallIcon(CommonDrawables.ic_notification) .setLargeIcon(getBitmap(R.drawable.element_logo_green)) .setColor(accentColor) .setPriority(NotificationCompat.PRIORITY_MAX)