aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-08-13 22:12:29 +0200
committerChristian Schneppe <christian@pix-art.de>2017-08-13 22:12:29 +0200
commit1fd688b9d84efc46c747cc7c941c3323b2732e06 (patch)
tree977b22664605433f53f89ec96dc01cd4e0fd7119 /src/main/java/de/pixart
parent9b981ab38b114d92eb806a50b94248e62af3fffa (diff)
remove all whitespaces in emoji only messages
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Message.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Message.java b/src/main/java/de/pixart/messenger/entities/Message.java
index 885e84f1d..e0b7029a5 100644
--- a/src/main/java/de/pixart/messenger/entities/Message.java
+++ b/src/main/java/de/pixart/messenger/entities/Message.java
@@ -672,7 +672,7 @@ public class Message extends AbstractEntity {
}
public boolean bodyIsOnlyEmojis() {
- return EmojiManager.isOnlyEmojis(body.trim());
+ return EmojiManager.isOnlyEmojis(body.replaceAll("\\s", ""));
}
public boolean bodyIsXmpp() {
diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
index 9aa34d88a..b9969e27c 100644
--- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
+++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
@@ -964,7 +964,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
if (GeoHelper.isGeoUri(message.getBody())) {
displayLocationMessage(viewHolder, message);
} else if (message.bodyIsOnlyEmojis()) {
- displayEmojiMessage(viewHolder, message.getBody().trim());
+ displayEmojiMessage(viewHolder, message.getBody().replaceAll("\\s", ""));
} else if (message.bodyIsXmpp()) {
displayXmppMessage(viewHolder, message.getBody().trim());
} else if (message.treatAsDownloadable()) {