diff --git a/app/src/main/java/com/nextcloud/talk/chat/data/network/OfflineFirstChatRepository.kt b/app/src/main/java/com/nextcloud/talk/chat/data/network/OfflineFirstChatRepository.kt index 15ab13cdc..4c52f7f31 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/data/network/OfflineFirstChatRepository.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/data/network/OfflineFirstChatRepository.kt @@ -38,8 +38,6 @@ import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.first import kotlinx.coroutines.flow.map import kotlinx.coroutines.launch -import java.lang.Thread.sleep -import java.util.concurrent.TimeUnit import javax.inject.Inject class OfflineFirstChatRepository @Inject constructor( @@ -392,29 +390,29 @@ class OfflineFirstChatRepository @Inject constructor( Integer.parseInt(it) } - return@map Pair( - HTTP_CODE_OK, - (it.body() as ChatOverall).ocs!!.data!! - ) - } + return@map Pair( + HTTP_CODE_OK, + (it.body() as ChatOverall).ocs!!.data!! + ) + } - HTTP_CODE_NOT_MODIFIED -> { - Log.d(TAG, "getMessagesFromServer HTTP_CODE_NOT_MODIFIED") + HTTP_CODE_NOT_MODIFIED -> { + Log.d(TAG, "getMessagesFromServer HTTP_CODE_NOT_MODIFIED") - return@map Pair( - HTTP_CODE_NOT_MODIFIED, - listOf() - ) - } + return@map Pair( + HTTP_CODE_NOT_MODIFIED, + listOf() + ) + } - HTTP_CODE_PRECONDITION_FAILED -> { - Log.d(TAG, "getMessagesFromServer HTTP_CODE_PRECONDITION_FAILED") + HTTP_CODE_PRECONDITION_FAILED -> { + Log.d(TAG, "getMessagesFromServer HTTP_CODE_PRECONDITION_FAILED") - return@map Pair( - HTTP_CODE_PRECONDITION_FAILED, - listOf() - ) - } + return@map Pair( + HTTP_CODE_PRECONDITION_FAILED, + listOf() + ) + } else -> { return@map Pair(