diff --git a/vector/src/main/java/im/vector/riotredesign/features/notifications/NotificationBroadcastReceiver.kt b/vector/src/main/java/im/vector/riotredesign/features/notifications/NotificationBroadcastReceiver.kt index 48f8ef43c7..499ea68ec3 100644 --- a/vector/src/main/java/im/vector/riotredesign/features/notifications/NotificationBroadcastReceiver.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/notifications/NotificationBroadcastReceiver.kt @@ -90,7 +90,8 @@ class NotificationBroadcastReceiver : BroadcastReceiver(), KoinComponent { // Create a new event to be displayed in the notification drawer, right now val notifiableMessageEvent = NotifiableMessageEvent( - Random().nextInt().toString(),// TODO event.eventId, + // Generate a Fake event id + UUID.randomUUID().toString(), false, System.currentTimeMillis(), session.getUser(session.sessionParams.credentials.userId)?.displayName @@ -98,8 +99,8 @@ class NotificationBroadcastReceiver : BroadcastReceiver(), KoinComponent { session.sessionParams.credentials.userId, message, room.roomId, - "Room name", // TODO room.getRoomDisplayName(context), - false // TODO room.isDirect + room.roomSummary?.displayName ?: room.roomId, + room.roomSummary?.isDirect == true ) notifiableMessageEvent.outGoingMessage = true @@ -107,6 +108,7 @@ class NotificationBroadcastReceiver : BroadcastReceiver(), KoinComponent { notificationDrawerManager.refreshNotificationDrawer() /* + // TODO Error cannot be managed the same way than in Riot val event = Event(mxMessage, session.credentials.userId, roomId) room.storeOutgoingEvent(event) diff --git a/vector/src/main/java/im/vector/riotredesign/features/notifications/NotificationDrawerManager.kt b/vector/src/main/java/im/vector/riotredesign/features/notifications/NotificationDrawerManager.kt index 6d5d29427f..23cd4c55e6 100644 --- a/vector/src/main/java/im/vector/riotredesign/features/notifications/NotificationDrawerManager.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/notifications/NotificationDrawerManager.kt @@ -96,7 +96,6 @@ class NotificationDrawerManager(val context: Context, } else { eventList.add(notifiableEvent) } - } } diff --git a/vector/src/main/java/im/vector/riotredesign/features/notifications/PushRuleTriggerListener.kt b/vector/src/main/java/im/vector/riotredesign/features/notifications/PushRuleTriggerListener.kt index a392746250..f3aed6ad05 100644 --- a/vector/src/main/java/im/vector/riotredesign/features/notifications/PushRuleTriggerListener.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/notifications/PushRuleTriggerListener.kt @@ -69,7 +69,6 @@ class PushRuleTriggerListener( session?.removePushRuleListener(this) session = null drawerManager.clearAllEvents() - drawerManager.refreshNotificationDrawer() } } \ No newline at end of file