Unverified Commit f4790284 authored by Filipe Brito's avatar Filipe Brito Committed by GitHub

Merge branch 'master' into beta

parents 6a9a559c 4c078255
...@@ -1101,9 +1101,13 @@ class ChatRoomPresenter @Inject constructor( ...@@ -1101,9 +1101,13 @@ class ChatRoomPresenter @Inject constructor(
} }
} }
} }
} catch (ex: Exception) { } catch (exception: Exception) {
Timber.e(ex) Timber.e(exception)
view.showMessage(ex.message!!) exception.message?.let {
view.showMessage(it)
}.ifNull {
view.showGenericErrorMessage()
}
} }
} }
} }
...@@ -1120,8 +1124,13 @@ class ChatRoomPresenter @Inject constructor( ...@@ -1120,8 +1124,13 @@ class ChatRoomPresenter @Inject constructor(
} }
} }
} }
} catch (ex: Exception) { } catch (exception: Exception) {
Timber.e(ex) Timber.e(exception)
exception.message?.let {
view.showMessage(it)
}.ifNull {
view.showGenericErrorMessage()
}
} }
} }
} }
...@@ -1136,8 +1145,13 @@ class ChatRoomPresenter @Inject constructor( ...@@ -1136,8 +1145,13 @@ class ChatRoomPresenter @Inject constructor(
client.toggleReaction(messageId, emoji.removeSurrounding(":")) client.toggleReaction(messageId, emoji.removeSurrounding(":"))
} }
logReactionEvent() logReactionEvent()
} catch (ex: RocketChatException) { } catch (exception: RocketChatException) {
Timber.e(ex) Timber.e(exception)
exception.message?.let {
view.showMessage(it)
}.ifNull {
view.showGenericErrorMessage()
}
} }
} }
} }
......
package chat.rocket.android.chatrooms.domain package chat.rocket.android.chatrooms.domain
import chat.rocket.android.db.DatabaseManager import chat.rocket.android.db.DatabaseManager
import chat.rocket.android.db.model.ChatRoomEntity
import chat.rocket.android.db.model.UserEntity
import chat.rocket.android.util.retryIO import chat.rocket.android.util.retryIO
import chat.rocket.core.RocketChatClient import chat.rocket.core.RocketChatClient
import chat.rocket.core.internal.rest.chatRooms import chat.rocket.core.internal.rest.chatRooms
import chat.rocket.core.model.ChatRoom
import chat.rocket.core.model.userId
import timber.log.Timber import timber.log.Timber
class FetchChatRoomsInteractor( class FetchChatRoomsInteractor(
......
...@@ -9,7 +9,7 @@ ext { ...@@ -9,7 +9,7 @@ ext {
dokka : '0.9.16', dokka : '0.9.16',
// For app // For app
kotlin : '1.3.21', kotlin : '1.3.31',
coroutine : '1.1.1', coroutine : '1.1.1',
appCompat : '1.0.2', appCompat : '1.0.2',
......
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