diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-03-23 23:09:30 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-03-23 23:09:30 +0100 |
commit | 6b7e4651b2b4c23ee44ad23817b1be63db445bf6 (patch) | |
tree | 2e040ef6ce992f894eb1ddf93120037f1883ca4c | |
parent | 732af090f16e45c26688b10869b388caa12f3484 (diff) |
call EditText.setText() instead of clear because clear causes problems
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationFragment.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index 68c9ab049..aeb906b9b 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -355,8 +355,8 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa case CANCEL: if (conversation != null) { if (conversation.setCorrectingMessage(null)) { - mEditMessage.getEditableText().clear(); - mEditMessage.getEditableText().append(conversation.getDraftMessage()); + mEditMessage.setText(""); + mEditMessage.append(conversation.getDraftMessage()); conversation.setDraftMessage(null); } else if (conversation.getMode() == Conversation.MODE_MULTI) { conversation.setNextCounterpart(null); @@ -862,7 +862,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa if (conversation.setOutgoingChatState(Config.DEFAULT_CHATSTATE)) { activity.xmppConnectionService.sendChatState(conversation); } - this.mEditMessage.getEditableText().clear(); + this.mEditMessage.setText(""); this.conversation.setNextCounterpart(counterpart); updateChatMsgHint(); updateSendButton(); @@ -875,8 +875,8 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa this.conversation.setCorrectingMessage(message); final Editable editable = mEditMessage.getText(); this.conversation.setDraftMessage(editable.toString()); - this.mEditMessage.getEditableText().clear(); - this.mEditMessage.getEditableText().append(message.getBody()); + this.mEditMessage.setText(""); + this.mEditMessage.append(message.getBody()); } @@ -1120,10 +1120,9 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa } protected void messageSent() { - Editable editable = mEditMessage.getEditableText(); - editable.clear(); + mEditMessage.setText(""); if (conversation.setCorrectingMessage(null)) { - editable.append(conversation.getDraftMessage()); + mEditMessage.append(conversation.getDraftMessage()); conversation.setDraftMessage(null); } updateChatMsgHint(); |