Unverified Commit 95ab3dce authored by Rafael Kellermann Streit's avatar Rafael Kellermann Streit Committed by GitHub

Merge pull request #1835 from RocketChat/release/3.1.1-hotfix

[RELEASE] 3.1.1 hotfix
parents b6cf0ae0 c6900816
...@@ -16,8 +16,8 @@ android { ...@@ -16,8 +16,8 @@ android {
applicationId "chat.rocket.android" applicationId "chat.rocket.android"
minSdkVersion versions.minSdk minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk targetSdkVersion versions.targetSdk
versionCode 2049 versionCode 2050
versionName "3.1.0" versionName "3.1.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true multiDexEnabled true
......
...@@ -1169,24 +1169,26 @@ class ChatRoomPresenter @Inject constructor( ...@@ -1169,24 +1169,26 @@ class ChatRoomPresenter @Inject constructor(
} }
private fun processTypingStatus(typingStatus: Pair<String, Boolean>) { private fun processTypingStatus(typingStatus: Pair<String, Boolean>) {
if (typingStatus.first != currentLoggedUsername) { synchronized(typingStatusList) {
if (!typingStatusList.any { username -> username == typingStatus.first }) { if (typingStatus.first != currentLoggedUsername) {
if (typingStatus.second) { if (!typingStatusList.any { username -> username == typingStatus.first }) {
typingStatusList.add(typingStatus.first)
}
} else {
typingStatusList.find { username -> username == typingStatus.first }?.let {
typingStatusList.remove(it)
if (typingStatus.second) { if (typingStatus.second) {
typingStatusList.add(typingStatus.first) typingStatusList.add(typingStatus.first)
} }
} else {
typingStatusList.find { username -> username == typingStatus.first }?.let {
typingStatusList.remove(it)
if (typingStatus.second) {
typingStatusList.add(typingStatus.first)
}
}
} }
}
if (typingStatusList.isNotEmpty()) { if (typingStatusList.isNotEmpty()) {
view.showTypingStatus(typingStatusList.toList()) view.showTypingStatus(typingStatusList.toList())
} else { } else {
view.hideTypingStatusView() view.hideTypingStatusView()
}
} }
} }
} }
......
...@@ -545,6 +545,9 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -545,6 +545,9 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
override fun dispatchUpdateMessage(index: Int, message: List<BaseUiModel<*>>) { override fun dispatchUpdateMessage(index: Int, message: List<BaseUiModel<*>>) {
ui { ui {
// TODO - investigate WHY we get a empty list here
if (message.isEmpty()) return@ui
if (adapter.updateItem(message.last())) { if (adapter.updateItem(message.last())) {
if (message.size > 1) { if (message.size > 1) {
adapter.prependData(listOf(message.first())) adapter.prependData(listOf(message.first()))
...@@ -591,7 +594,11 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -591,7 +594,11 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
} }
} }
override fun showGenericErrorMessage() = showMessage(getString(R.string.msg_generic_error)) override fun showGenericErrorMessage(){
ui {
showMessage(getString(R.string.msg_generic_error))
}
}
override fun populatePeopleSuggestions(members: List<PeopleSuggestionUiModel>) { override fun populatePeopleSuggestions(members: List<PeopleSuggestionUiModel>) {
ui { ui {
......
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