mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-15 01:35:07 +08:00
Feature/fix notification clearing (#1707)
Updating notification when entering a room
This commit is contained in:
parent
44fb53ce6b
commit
6e0095edb0
@ -9,6 +9,7 @@ Improvements 🙌:
|
||||
|
||||
Bugfix 🐛:
|
||||
- Fix theme issue on Room directory screen (#1613)
|
||||
- Fix notification not dismissing when entering a room
|
||||
|
||||
Translations 🗣:
|
||||
-
|
||||
|
@ -155,14 +155,17 @@ class NotificationDrawerManager @Inject constructor(private val context: Context
|
||||
/** Clear all known message events for this room */
|
||||
fun clearMessageEventOfRoom(roomId: String?) {
|
||||
Timber.v("clearMessageEventOfRoom $roomId")
|
||||
|
||||
if (roomId != null) {
|
||||
var shouldUpdate = false
|
||||
synchronized(eventList) {
|
||||
eventList.removeAll { e ->
|
||||
shouldUpdate = eventList.removeAll { e ->
|
||||
e is NotifiableMessageEvent && e.roomId == roomId
|
||||
}
|
||||
}
|
||||
refreshNotificationDrawer()
|
||||
if (shouldUpdate) {
|
||||
notificationUtils.cancelNotificationMessage(roomId, ROOM_MESSAGES_NOTIFICATION_ID)
|
||||
refreshNotificationDrawer()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user