mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-23 01:45:52 +03:00
relying on the notification refreshing to cancel/update the notifications
This commit is contained in:
parent
03fe45da60
commit
587466e009
1 changed files with 1 additions and 7 deletions
|
@ -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 a new issue