Commit b26168ed authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Fix add a reaction not working

parent eaccad7e
...@@ -18,8 +18,8 @@ android { ...@@ -18,8 +18,8 @@ android {
applicationId "chat.rocket.android" applicationId "chat.rocket.android"
minSdkVersion versions.minSdk minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk targetSdkVersion versions.targetSdk
versionCode 2064 versionCode 2065
versionName "3.3.1" versionName "3.3.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true multiDexEnabled true
......
...@@ -1043,9 +1043,13 @@ class ChatRoomPresenter @Inject constructor( ...@@ -1043,9 +1043,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()
}
} }
} }
} }
...@@ -1062,8 +1066,13 @@ class ChatRoomPresenter @Inject constructor( ...@@ -1062,8 +1066,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()
}
} }
} }
} }
...@@ -1078,8 +1087,13 @@ class ChatRoomPresenter @Inject constructor( ...@@ -1078,8 +1087,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(
......
...@@ -10,7 +10,7 @@ buildscript { ...@@ -10,7 +10,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.3.2' classpath 'com.android.tools.build:gradle:3.4.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}" classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}"
classpath 'com.google.gms:google-services:4.2.0' classpath 'com.google.gms:google-services:4.2.0'
......
#Wed Oct 10 10:41:36 UYT 2018 #Thu May 09 14:55:51 BRT 2019
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
distributionSha256Sum=b7aedd369a26b177147bcb715f8b1fc4fe32b0a6ade0d7fd8ee5ed0c6f731f2c distributionSha256Sum=b7aedd369a26b177147bcb715f8b1fc4fe32b0a6ade0d7fd8ee5ed0c6f731f2c
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