Skip to content
This repository has been archived by the owner on Jun 7, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1835 from RocketChat/release/3.1.1-hotfix
Browse files Browse the repository at this point in the history
[RELEASE] 3.1.1 hotfix
  • Loading branch information
rafaelks authored Nov 5, 2018
2 parents b6cf0ae + c690081 commit 95ab3dc
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 16 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ android {
applicationId "chat.rocket.android"
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk
versionCode 2049
versionName "3.1.0"
versionCode 2050
versionName "3.1.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1169,24 +1169,26 @@ class ChatRoomPresenter @Inject constructor(
}

private fun processTypingStatus(typingStatus: Pair<String, Boolean>) {
if (typingStatus.first != currentLoggedUsername) {
if (!typingStatusList.any { username -> username == typingStatus.first }) {
if (typingStatus.second) {
typingStatusList.add(typingStatus.first)
}
} else {
typingStatusList.find { username -> username == typingStatus.first }?.let {
typingStatusList.remove(it)
synchronized(typingStatusList) {
if (typingStatus.first != currentLoggedUsername) {
if (!typingStatusList.any { username -> username == typingStatus.first }) {
if (typingStatus.second) {
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()) {
view.showTypingStatus(typingStatusList.toList())
} else {
view.hideTypingStatusView()
if (typingStatusList.isNotEmpty()) {
view.showTypingStatus(typingStatusList.toList())
} else {
view.hideTypingStatusView()
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,9 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR

override fun dispatchUpdateMessage(index: Int, message: List<BaseUiModel<*>>) {
ui {
// TODO - investigate WHY we get a empty list here
if (message.isEmpty()) return@ui

if (adapter.updateItem(message.last())) {
if (message.size > 1) {
adapter.prependData(listOf(message.first()))
Expand Down Expand Up @@ -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>) {
ui {
Expand Down

0 comments on commit 95ab3dc

Please sign in to comment.