aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Conversation.java4
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java
index c23305b3e..7e75600f3 100644
--- a/src/main/java/de/pixart/messenger/entities/Conversation.java
+++ b/src/main/java/de/pixart/messenger/entities/Conversation.java
@@ -372,8 +372,10 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
setAttribute(ATTRIBUTE_CRYPTO_TARGETS, acceptedTargets);
}
- public void setCorrectingMessage(Message correctingMessage) {
+ public boolean setCorrectingMessage(Message correctingMessage) {
+ boolean corrected = this.correctingMessage != null && correctingMessage == null;
this.correctingMessage = correctingMessage;
+ return corrected;
}
public Message getCorrectingMessage() {
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index b91e90bbd..801c47e60 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -416,7 +416,6 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
message.setBody(body);
message.setEdited(message.getUuid());
message.setUuid(UUID.randomUUID().toString());
- conversation.setCorrectingMessage(null);
}
switch (conversation.getNextEncryption()) {
case Message.ENCRYPTION_OTR:
@@ -1108,7 +1107,8 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
}
protected void messageSent() {
- mEditMessage.setText("");
+ mEditMessage.getEditableText().clear();
+ conversation.setCorrectingMessage(null);
updateChatMsgHint();
new Handler().post(new Runnable() {
@Override