forked from GitHub-Mirror/riotX-android
Fix crash observe on the PlayStore (#341)
This commit is contained in:
parent
b15dea6de3
commit
222201cc64
@ -12,6 +12,7 @@ Other changes:
|
|||||||
|
|
||||||
Bugfix:
|
Bugfix:
|
||||||
- Fix regression on permalink click
|
- Fix regression on permalink click
|
||||||
|
- Fix crash reported by the PlayStore (#341)
|
||||||
|
|
||||||
Translations:
|
Translations:
|
||||||
-
|
-
|
||||||
|
@ -121,12 +121,14 @@ class NotificationDrawerManager @Inject constructor(private val context: Context
|
|||||||
Timber.v("clearMessageEventOfRoom $roomId")
|
Timber.v("clearMessageEventOfRoom $roomId")
|
||||||
|
|
||||||
if (roomId != null) {
|
if (roomId != null) {
|
||||||
|
synchronized(eventList) {
|
||||||
eventList.removeAll { e ->
|
eventList.removeAll { e ->
|
||||||
if (e is NotifiableMessageEvent) {
|
if (e is NotifiableMessageEvent) {
|
||||||
return@removeAll e.roomId == roomId
|
return@removeAll e.roomId == roomId
|
||||||
}
|
}
|
||||||
return@removeAll false
|
return@removeAll false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
NotificationUtils.cancelNotificationMessage(context, roomId, ROOM_MESSAGES_NOTIFICATION_ID)
|
NotificationUtils.cancelNotificationMessage(context, roomId, ROOM_MESSAGES_NOTIFICATION_ID)
|
||||||
}
|
}
|
||||||
refreshNotificationDrawer()
|
refreshNotificationDrawer()
|
||||||
@ -433,6 +435,7 @@ class NotificationDrawerManager @Inject constructor(private val context: Context
|
|||||||
|
|
||||||
|
|
||||||
fun persistInfo() {
|
fun persistInfo() {
|
||||||
|
synchronized(eventList) {
|
||||||
if (eventList.isEmpty()) {
|
if (eventList.isEmpty()) {
|
||||||
deleteCachedRoomNotifications(context)
|
deleteCachedRoomNotifications(context)
|
||||||
return
|
return
|
||||||
@ -447,6 +450,7 @@ class NotificationDrawerManager @Inject constructor(private val context: Context
|
|||||||
Timber.e(e, "## Failed to save cached notification info")
|
Timber.e(e, "## Failed to save cached notification info")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun loadEventInfo(): ArrayList<NotifiableEvent> {
|
private fun loadEventInfo(): ArrayList<NotifiableEvent> {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user