aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/entities
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-08-03 08:55:22 +0200
committerChristian Schneppe <christian@pix-art.de>2017-08-03 08:55:22 +0200
commitaffb3c4254aa25e99e0682b5c0e96b4c7dd174fb (patch)
treec5452cdb12690402e7811c69378637aa0364ad9e /src/main/java/de/pixart/messenger/entities
parentbec8886c3028261820691c2d86f677fefbfc9a81 (diff)
display messages that only contain emoji slightly larger
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Message.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Message.java b/src/main/java/de/pixart/messenger/entities/Message.java
index d13e90743..885e84f1d 100644
--- a/src/main/java/de/pixart/messenger/entities/Message.java
+++ b/src/main/java/de/pixart/messenger/entities/Message.java
@@ -4,6 +4,8 @@ import android.content.ContentValues;
import android.database.Cursor;
import android.text.SpannableStringBuilder;
+import com.vdurmont.emoji.EmojiManager;
+
import java.net.MalformedURLException;
import java.net.URL;
@@ -501,8 +503,8 @@ public class Message extends AbstractEntity {
!this.treatAsDownloadable() &&
!message.getBody().startsWith(ME_COMMAND) &&
!this.getBody().startsWith(ME_COMMAND) &&
- !this.bodyIsHeart() &&
- !message.bodyIsHeart() &&
+ !this.bodyIsOnlyEmojis() &&
+ !message.bodyIsOnlyEmojis() &&
!this.bodyIsXmpp() &&
!message.bodyIsXmpp() &&
((this.axolotlFingerprint == null && message.axolotlFingerprint == null) || this.axolotlFingerprint.equals(message.getFingerprint())) &&
@@ -669,8 +671,8 @@ public class Message extends AbstractEntity {
}
}
- public boolean bodyIsHeart() {
- return body != null && UIHelper.HEARTS.contains(body.trim());
+ public boolean bodyIsOnlyEmojis() {
+ return EmojiManager.isOnlyEmojis(body.trim());
}
public boolean bodyIsXmpp() {