Rename OneShotNotification.key to OneShotNotification.tag for clarity.

This commit is contained in:
Benoit Marty 2025-10-26 09:05:12 +01:00 committed by Benoit Marty
parent 7d7ea5d67c
commit 7ee00a65d8
4 changed files with 13 additions and 13 deletions

View file

@ -114,7 +114,7 @@ class DefaultNotificationDataFactory(
): List<OneShotNotification> {
return map { event ->
OneShotNotification(
key = event.roomId.value,
tag = event.roomId.value,
notification = notificationCreator.createRoomInvitationNotification(notificationAccountParams, event),
summaryLine = event.description,
isNoisy = event.noisy,
@ -130,7 +130,7 @@ class DefaultNotificationDataFactory(
): List<OneShotNotification> {
return map { event ->
OneShotNotification(
key = event.eventId.value,
tag = event.eventId.value,
notification = notificationCreator.createSimpleEventNotification(notificationAccountParams, event),
summaryLine = event.description,
isNoisy = event.noisy,
@ -146,7 +146,7 @@ class DefaultNotificationDataFactory(
): List<OneShotNotification> {
return map { event ->
OneShotNotification(
key = event.eventId.value,
tag = event.eventId.value,
notification = notificationCreator.createFallbackNotification(notificationAccountParams, event),
summaryLine = event.description.orEmpty(),
isNoisy = false,
@ -239,7 +239,7 @@ data class RoomNotification(
data class OneShotNotification(
val notification: Notification,
val key: String,
val tag: String,
val summaryLine: CharSequence,
val isNoisy: Boolean,
val timestamp: Long,

View file

@ -94,9 +94,9 @@ class NotificationRenderer(
invitationNotifications.forEach { notificationData ->
if (useCompleteNotificationFormat) {
Timber.tag(loggerTag.value).d("Updating invitation notification ${notificationData.key}")
Timber.tag(loggerTag.value).d("Updating invitation notification ${notificationData.tag}")
notificationDisplayer.showNotificationMessage(
tag = notificationData.key,
tag = notificationData.tag,
id = NotificationIdProvider.getRoomInvitationNotificationId(currentUser.userId),
notification = notificationData.notification
)
@ -105,9 +105,9 @@ class NotificationRenderer(
simpleNotifications.forEach { notificationData ->
if (useCompleteNotificationFormat) {
Timber.tag(loggerTag.value).d("Updating simple notification ${notificationData.key}")
Timber.tag(loggerTag.value).d("Updating simple notification ${notificationData.tag}")
notificationDisplayer.showNotificationMessage(
tag = notificationData.key,
tag = notificationData.tag,
id = NotificationIdProvider.getRoomEventNotificationId(currentUser.userId),
notification = notificationData.notification
)