Ensure Mark as fully read is not invoked several times.
This commit is contained in:
parent
c7d4c13efa
commit
4add14da84
1 changed files with 2 additions and 3 deletions
|
|
@ -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)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue