Commit 120dfd0f authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Fix a bug that makes the typing status being send multiples time over the socket.

parent b537e472
......@@ -312,6 +312,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
showToolbarChatRoomIcon(chatRoomType)
}
getDraftMessage()
subscribeComposeTextMessage()
analyticsManager.logScreenView(ScreenViewEvent.ChatRoom)
}
......@@ -848,7 +849,6 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
true
)
subscribeComposeTextMessage()
emojiKeyboardPopup = EmojiKeyboardPopup(activity!!, activity!!.findViewById(R.id.fragment_container))
emojiKeyboardPopup.listener = this
......@@ -1000,13 +1000,13 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
}
private fun subscribeComposeTextMessage() {
val editTextObservable = text_message.asObservable()
text_message.asObservable().let {
compositeDisposable.addAll(
subscribeComposeButtons(editTextObservable),
subscribeComposeTypingStatus(editTextObservable)
subscribeComposeButtons(it),
subscribeComposeTypingStatus(it)
)
}
}
private fun unsubscribeComposeTextMessage() {
compositeDisposable.clear()
......
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