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)
......@@ -40,4 +43,4 @@ class MessageInfoPresenter @Inject constructor(
}
}
}
}
\ No newline at end of file
}
......@@ -108,4 +108,4 @@ class MessageInfoFragment : Fragment(), MessageInfoView {
companion object {
const val TAG_MESSAGE_INFO_FRAGMENT = "MessageInfoFragment"
}
}
\ No newline at end of file
}
......@@ -41,4 +41,4 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="04/06/2018 14:18:36" />
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
</android.support.constraint.ConstraintLayout>
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