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