relying on the notification refreshing to cancel/update the notifications
This commit is contained in:
parent
03fe45da60
commit
587466e009
|
@ -165,14 +165,8 @@ class NotificationDrawerManager @Inject constructor(private val context: Context
|
|||
fun clearMessageEventOfRoom(roomId: String?) {
|
||||
Timber.v("clearMessageEventOfRoom $roomId")
|
||||
if (roomId != null) {
|
||||
var shouldUpdate = false
|
||||
synchronized(eventList) {
|
||||
shouldUpdate = eventList.removeAll { e ->
|
||||
e is NotifiableMessageEvent && e.roomId == roomId
|
||||
}
|
||||
}
|
||||
val shouldUpdate = removeAll { it is NotifiableMessageEvent && it.roomId == roomId }
|
||||
if (shouldUpdate) {
|
||||
notificationUtils.cancelNotificationMessage(roomId, ROOM_MESSAGES_NOTIFICATION_ID)
|
||||
refreshNotificationDrawer()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue