diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-05-21 20:34:38 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-05-21 20:34:38 +0200 |
commit | ca1ffdce5a1c1b3d570173bc060a0075fb157d50 (patch) | |
tree | 692cf7c53bce8dde5d539f653364c6cf527964f2 /src/main/java/de/pixart/messenger/ui/ConversationFragment.java | |
parent | 13c11f4100d14fb9d70adb0ca0a48019b29b26c6 (diff) |
do not save draft if message is completly empty and fixed appending shared text
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationFragment.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index d47f8cb72..be6660f53 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -2724,7 +2724,9 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke return; } String previous = this.binding.textinput.getText().toString(); - if (previous.length() != 0 && !previous.endsWith(" ")) { + if (UIHelper.isLastLineQuote(previous)) { + text = '\n' + text; + } else if (previous.length() != 0 && !Character.isWhitespace(previous.charAt(previous.length() - 1))) { text = " " + text; } this.binding.textinput.append(text); |