aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/entities
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-03-04 18:26:07 +0100
committerChristian Schneppe <christian@pix-art.de>2017-03-04 18:26:07 +0100
commitaa5dba949a0f5b2bbf887e14ffe859e49f768a75 (patch)
tree35c8914ac6845febf3d8a21d0b129eea0be094ca /src/main/java/de/pixart/messenger/entities
parentf9f2b6209c25b69303c6c691b5e8d745069d3abc (diff)
Keep draft even when correcting previously sent msg
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Conversation.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java
index 7e75600f3..24b45e158 100644
--- a/src/main/java/de/pixart/messenger/entities/Conversation.java
+++ b/src/main/java/de/pixart/messenger/entities/Conversation.java
@@ -59,6 +59,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
public static final String ATTRIBUTE_CRYPTO_TARGETS = "crypto_targets";
public static final String ATTRIBUTE_LAST_CLEAR_HISTORY = "last_clear_history";
+ private String draftMessage;
private String name;
private String contactUuid;
private String accountUuid;
@@ -373,9 +374,8 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
}
public boolean setCorrectingMessage(Message correctingMessage) {
- boolean corrected = this.correctingMessage != null && correctingMessage == null;
this.correctingMessage = correctingMessage;
- return corrected;
+ return correctingMessage == null && draftMessage != null;
}
public Message getCorrectingMessage() {
@@ -399,6 +399,14 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
}
}
+ public String getDraftMessage() {
+ return draftMessage;
+ }
+
+ public void setDraftMessage(String draftMessage) {
+ this.draftMessage = draftMessage;
+ }
+
public interface OnMessageFound {
void onMessageFound(final Message message);
}