[Messages/Compose] Fix underlined word under the caret.

This commit is contained in:
Kuba Szczodrzyński 2020-04-02 15:38:16 +02:00
parent 7f0aea29cd
commit fcb627aac6

View File

@ -433,6 +433,15 @@ class MessagesComposeFragment : Fragment(), CoroutineScope {
return
}
// do magic
// apparently this removes an underline
// span from the text where the caret is
b.subject.requestFocus()
b.subject.clearFocus()
activity.navView.bottomSheet.hideKeyboard()
b.text.clearFocus()
b.text.setSelection(0)
if (b.subjectLayout.counterMaxLength != -1 && b.subject.length() > b.subjectLayout.counterMaxLength)
return
if (b.textLayout.counterMaxLength != -1 && b.text.length() > b.textLayout.counterMaxLength)