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

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)

View File

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

}
}


View File

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

}