Merge pull request #6666 from thundernest/notification_summary_actions

Limit summary notification actions to active notifications
This commit is contained in:
cketti 2023-02-14 16:58:47 +01:00 committed by GitHub
commit afaa6a17c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -29,6 +29,9 @@ internal data class NotificationData(
}
}
val activeMessageReferences: List<MessageReference>
get() = activeNotifications.map { it.content.messageReference }
fun isEmpty() = activeNotifications.isEmpty()
companion object {

View file

@ -37,7 +37,7 @@ internal class SummaryNotificationDataCreator(
timestamp = timestamp,
content = data.summaryContent,
additionalMessagesCount = data.additionalMessagesCount,
messageReferences = data.messageReferences,
messageReferences = data.activeMessageReferences,
actions = createSummaryNotificationActions(),
wearActions = createSummaryWearNotificationActions(data.account)
)