From aa5dba949a0f5b2bbf887e14ffe859e49f768a75 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sat, 4 Mar 2017 18:26:07 +0100 Subject: Keep draft even when correcting previously sent msg --- src/main/java/de/pixart/messenger/entities/Conversation.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/main/java/de/pixart/messenger/entities') 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); } -- cgit v1.2.3