mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 11:39:42 +01:00
Merge pull request #4139 from nextcloud/bugfix/4010/fixSendTextToTalkApp
fix to display text that was sent to app via "share to"
This commit is contained in:
commit
129ba94af5
@ -247,11 +247,13 @@ class MessageInputFragment : Fragment() {
|
||||
}
|
||||
|
||||
private fun restoreState() {
|
||||
requireContext().getSharedPreferences(chatActivity.localClassName, AppCompatActivity.MODE_PRIVATE).apply {
|
||||
val text = getString(chatActivity.roomToken, "")
|
||||
val cursor = getInt(chatActivity.roomToken + CURSOR_KEY, 0)
|
||||
binding.fragmentMessageInputView.messageInput.setText(text)
|
||||
binding.fragmentMessageInputView.messageInput.setSelection(cursor)
|
||||
if (binding.fragmentMessageInputView.inputEditText.text.isEmpty()) {
|
||||
requireContext().getSharedPreferences(chatActivity.localClassName, AppCompatActivity.MODE_PRIVATE).apply {
|
||||
val text = getString(chatActivity.roomToken, "")
|
||||
val cursor = getInt(chatActivity.roomToken + CURSOR_KEY, 0)
|
||||
binding.fragmentMessageInputView.messageInput.setText(text)
|
||||
binding.fragmentMessageInputView.messageInput.setSelection(cursor)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user