Do not open again the DM if the user is already seeing it

This commit is contained in:
Benoit Marty 2020-10-29 11:05:09 +01:00
parent d9723387eb
commit a393c4dfae

View file

@ -289,9 +289,11 @@ class RoomDetailViewModel @AssistedInject constructor(
_viewEvents.post(RoomDetailViewEvents.OpenRoom(roomId))
}
} else {
if (existingDmRoomId != initialState.roomId) {
_viewEvents.post(RoomDetailViewEvents.OpenRoom(existingDmRoomId))
}
}
}
private fun handleJumpToReadReceipt(action: RoomDetailAction.JumpToReadReceipt) {
room.getUserReadReceipt(action.userId)