mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Merge pull request #5192 from frebib/frebib/conversation-notification
Set shortcut ID on received notifications to make them appear as a Conversation
This commit is contained in:
+4
-1
@@ -137,7 +137,10 @@ class DefaultNotificationCreator(
|
|||||||
// that can be displayed in not disturb mode if white listed (the later will need compat28.x)
|
// that can be displayed in not disturb mode if white listed (the later will need compat28.x)
|
||||||
.setCategory(NotificationCompat.CATEGORY_MESSAGE)
|
.setCategory(NotificationCompat.CATEGORY_MESSAGE)
|
||||||
// ID of the corresponding shortcut, for conversation features under API 30+
|
// ID of the corresponding shortcut, for conversation features under API 30+
|
||||||
.setShortcutId(roomInfo.roomId.value)
|
// Must match those created in the ShortcutInfoCompat.Builder()
|
||||||
|
// for the notification to appear as a "Conversation":
|
||||||
|
// https://developer.android.com/develop/ui/views/notifications/conversations
|
||||||
|
.setShortcutId("${roomInfo.sessionId.value}-${roomInfo.roomId.value}")
|
||||||
// Auto-bundling is enabled for 4 or more notifications on API 24+ (N+)
|
// Auto-bundling is enabled for 4 or more notifications on API 24+ (N+)
|
||||||
// devices and all Wear devices. But we want a custom grouping, so we specify the groupID
|
// devices and all Wear devices. But we want a custom grouping, so we specify the groupID
|
||||||
.setGroup(roomInfo.sessionId.value)
|
.setGroup(roomInfo.sessionId.value)
|
||||||
|
|||||||
Reference in New Issue
Block a user