Commit 7ab7be11 authored by Leonardo Aramaki's avatar Leonardo Aramaki

One of the overloaded map funcions which is running under current thread...

One of the overloaded map funcions which is running under current thread coroutine context should go under CommonPool
parent ec47f5c3
......@@ -85,9 +85,10 @@ class UiModelMapper @Inject constructor(
suspend fun map(
message: Message,
roomUiModel: RoomUiModel = RoomUiModel(roles = emptyList(), isBroadcast = true)
): List<BaseUiModel<*>> {
return translate(message, roomUiModel)
}
): List<BaseUiModel<*>> =
withContext(CommonPool) {
return@withContext translate(message, roomUiModel)
}
suspend fun map(
messages: List<Message>,
......
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