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

Fix indentation.

parent 4e3936ca
...@@ -476,23 +476,18 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -476,23 +476,18 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
override fun showTypingStatus(usernameList: List<String>) { override fun showTypingStatus(usernameList: List<String>) {
ui { ui {
when (usernameList.size) { when (usernameList.size) {
1 -> { 1 -> text_typing_status.text =
text_typing_status.text = SpannableStringBuilder()
SpannableStringBuilder() .bold { append(usernameList[0]) }
.bold { append(usernameList[0]) } .append(getString(R.string.msg_is_typing))
.append(getString(R.string.msg_is_typing)) 2 -> text_typing_status.text =
} SpannableStringBuilder()
2 -> { .bold { append(usernameList[0]) }
text_typing_status.text = .append(getString(R.string.msg_and))
SpannableStringBuilder() .bold { append(usernameList[1]) }
.bold { append(usernameList[0]) } .append(getString(R.string.msg_are_typing))
.append(getString(R.string.msg_and))
.bold { append(usernameList[1]) } else -> text_typing_status.text = getString(R.string.msg_several_users_are_typing)
.append(getString(R.string.msg_are_typing))
}
else -> {
text_typing_status.text = getString(R.string.msg_several_users_are_typing)
}
} }
text_typing_status.isVisible = true text_typing_status.isVisible = true
} }
...@@ -716,16 +711,16 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -716,16 +711,16 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
text_connection_status.text = getString(R.string.status_connected) text_connection_status.text = getString(R.string.status_connected)
handler.postDelayed(dismissStatus, 2000) handler.postDelayed(dismissStatus, 2000)
} }
is State.Disconnected -> text_connection_status.text = is State.Disconnected ->
getString(R.string.status_disconnected) text_connection_status.text = getString(R.string.status_disconnected)
is State.Connecting -> text_connection_status.text = is State.Connecting ->
getString(R.string.status_connecting) text_connection_status.text = getString(R.string.status_connecting)
is State.Authenticating -> text_connection_status.text = is State.Authenticating ->
getString(R.string.status_authenticating) text_connection_status.text = getString(R.string.status_authenticating)
is State.Disconnecting -> text_connection_status.text = is State.Disconnecting ->
getString(R.string.status_disconnecting) text_connection_status.text = getString(R.string.status_disconnecting)
is State.Waiting -> text_connection_status.text = is State.Waiting ->
getString(R.string.status_waiting, state.seconds) text_connection_status.text = getString(R.string.status_waiting, state.seconds)
} }
} }
} }
...@@ -802,12 +797,10 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -802,12 +797,10 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
) )
subscribeComposeTextMessage() subscribeComposeTextMessage()
emojiKeyboardPopup = emojiKeyboardPopup = EmojiKeyboardPopup(activity!!, activity!!.findViewById(R.id.fragment_container))
EmojiKeyboardPopup(activity!!, activity!!.findViewById(R.id.fragment_container))
emojiKeyboardPopup.listener = this emojiKeyboardPopup.listener = this
text_message.listener = object : ComposerEditText.ComposerEditTextListener { text_message.listener = object : ComposerEditText.ComposerEditTextListener {
override fun onKeyboardOpened() { override fun onKeyboardOpened() {}
}
override fun onKeyboardClosed() { override fun onKeyboardClosed() {
activity?.let { activity?.let {
......
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