Commit 32588833 authored by Akshat Jain's avatar Akshat Jain

requested changes

parent fc0e5f04
...@@ -172,11 +172,13 @@ class ChatRoomPresenter @Inject constructor( ...@@ -172,11 +172,13 @@ class ChatRoomPresenter @Inject constructor(
} }
private suspend fun subscribeRoomChanges() { private suspend fun subscribeRoomChanges() {
chatRoomId?.let { withContext(CommonPool + strategy.jobs) {
manager.addRoomChannel(it, roomChangesChannel) chatRoomId?.let {
for (room in roomChangesChannel) { manager.addRoomChannel(it, roomChangesChannel)
dbManager.getRoom(room.id)?.let { for (room in roomChangesChannel) {
view.onRoomUpdated(roomMapper.map(chatRoom = it, showLastMessage = true)) dbManager.getRoom(room.id)?.let {
view.onRoomUpdated(roomMapper.map(chatRoom = it, showLastMessage = true))
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment