Unverified Commit d4c36744 authored by Pancor's avatar Pancor Committed by GitHub

code refactor

parent 516f941d
...@@ -507,13 +507,13 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -507,13 +507,13 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
private fun getUnfinishedMessage() { private fun getUnfinishedMessage() {
val unfinishedMessage = presenter.getUnfinishedMessage(chatRoomId) val unfinishedMessage = presenter.getUnfinishedMessage(chatRoomId)
if (unfinishedMessage.isNotBlank() && activity != null) { if (unfinishedMessage.isNotBlank()) {
text_message.setText(unfinishedMessage) text_message.setText(unfinishedMessage)
val orientation = resources.configuration.orientation val orientation = resources.configuration.orientation
if (orientation == Configuration.ORIENTATION_PORTRAIT) { if (orientation == Configuration.ORIENTATION_PORTRAIT) {
KeyboardHelper.showSoftKeyboardOnActivityStart(activity!!, text_message) KeyboardHelper.showSoftKeyboard(text_message)
} else if (orientation == Configuration.ORIENTATION_LANDSCAPE) { } else {
text_message.requestFocus() //TODO show keyboard in full screen mode when landscape orientation
} }
} }
} }
......
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