Notification: cleanup

This commit is contained in:
Benoit Marty 2019-06-25 16:19:57 +02:00
parent f6c500d120
commit 4f0ed402bf
3 changed files with 5 additions and 5 deletions

View File

@ -90,7 +90,8 @@ class NotificationBroadcastReceiver : BroadcastReceiver(), KoinComponent {
// Create a new event to be displayed in the notification drawer, right now // Create a new event to be displayed in the notification drawer, right now


val notifiableMessageEvent = NotifiableMessageEvent( val notifiableMessageEvent = NotifiableMessageEvent(
Random().nextInt().toString(),// TODO event.eventId, // Generate a Fake event id
UUID.randomUUID().toString(),
false, false,
System.currentTimeMillis(), System.currentTimeMillis(),
session.getUser(session.sessionParams.credentials.userId)?.displayName session.getUser(session.sessionParams.credentials.userId)?.displayName
@ -98,8 +99,8 @@ class NotificationBroadcastReceiver : BroadcastReceiver(), KoinComponent {
session.sessionParams.credentials.userId, session.sessionParams.credentials.userId,
message, message,
room.roomId, room.roomId,
"Room name", // TODO room.getRoomDisplayName(context), room.roomSummary?.displayName ?: room.roomId,
false // TODO room.isDirect room.roomSummary?.isDirect == true
) )
notifiableMessageEvent.outGoingMessage = true notifiableMessageEvent.outGoingMessage = true


@ -107,6 +108,7 @@ class NotificationBroadcastReceiver : BroadcastReceiver(), KoinComponent {
notificationDrawerManager.refreshNotificationDrawer() notificationDrawerManager.refreshNotificationDrawer()


/* /*
// TODO Error cannot be managed the same way than in Riot


val event = Event(mxMessage, session.credentials.userId, roomId) val event = Event(mxMessage, session.credentials.userId, roomId)
room.storeOutgoingEvent(event) room.storeOutgoingEvent(event)

View File

@ -96,7 +96,6 @@ class NotificationDrawerManager(val context: Context,
} else { } else {
eventList.add(notifiableEvent) eventList.add(notifiableEvent)
} }

} }
} }



View File

@ -69,7 +69,6 @@ class PushRuleTriggerListener(
session?.removePushRuleListener(this) session?.removePushRuleListener(this)
session = null session = null
drawerManager.clearAllEvents() drawerManager.clearAllEvents()
drawerManager.refreshNotificationDrawer()
} }


} }