mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Ensure Mark as fully read is not invoked several times.
This commit is contained in:
+2
-3
@@ -250,8 +250,8 @@ class MessagesPresenter(
|
|||||||
is MessagesEvent.OnUserClicked -> {
|
is MessagesEvent.OnUserClicked -> {
|
||||||
roomMemberModerationState.eventSink(RoomMemberModerationEvents.ShowActionsForUser(event.user))
|
roomMemberModerationState.eventSink(RoomMemberModerationEvents.ShowActionsForUser(event.user))
|
||||||
}
|
}
|
||||||
is MessagesEvent.MarkAsFullyReadAndExit -> coroutineScope.launch {
|
is MessagesEvent.MarkAsFullyReadAndExit -> if (!markingAsReadAndExiting.getAndSet(true)) {
|
||||||
if (!markingAsReadAndExiting.getAndSet(true)) {
|
coroutineScope.launch {
|
||||||
val latestEventId = room.liveTimeline.getLatestEventId().getOrElse {
|
val latestEventId = room.liveTimeline.getLatestEventId().getOrElse {
|
||||||
Timber.w(it, "Failed to get latest event id to mark as fully read")
|
Timber.w(it, "Failed to get latest event id to mark as fully read")
|
||||||
navigator.close()
|
navigator.close()
|
||||||
@@ -263,7 +263,6 @@ class MessagesPresenter(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
navigator.close()
|
navigator.close()
|
||||||
markingAsReadAndExiting.set(false)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user