Commit e50d1438 authored by Leonardo Aramaki's avatar Leonardo Aramaki

wrap getMessageReadReceipts call in retryIO

parent f4bc2d1d
......@@ -8,6 +8,7 @@ import chat.rocket.android.server.domain.GetCurrentServerInteractor
import chat.rocket.android.server.domain.MessagesRepository
import chat.rocket.android.server.infraestructure.ConnectionManagerFactory
import chat.rocket.android.util.extensions.launchUI
import chat.rocket.android.util.retryIO
import chat.rocket.common.RocketChatException
import chat.rocket.core.internal.rest.getMessageReadReceipts
import chat.rocket.core.internal.rest.queryUsers
......@@ -30,7 +31,9 @@ class MessageInfoPresenter @Inject constructor(
launchUI(strategy) {
try {
view.showLoading()
val readReceipts = client.getMessageReadReceipts(messageId = messageId).result
val readReceipts = retryIO(description = "getMessageReadReceipts") {
client.getMessageReadReceipts(messageId = messageId).result
}
view.showReadReceipts(mapper.map(readReceipts))
} catch (ex: RocketChatException) {
Timber.e(ex)
......
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