Skip to content

Commit 3b87e02

Browse files
fix(emoji): Update to latest API
Signed-off-by: Andy Scherzinger <[email protected]>
1 parent bb39120 commit 3b87e02

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/src/main/java/com/nextcloud/talk/utils/TextMatchers.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
public final class TextMatchers {
1818

1919
public static boolean isMessageWithSingleEmoticonOnly(@Nullable final String text) {
20-
final EmojiInformation emojiInformation = Emojis.emojiInformation(text);
21-
return (emojiInformation.isOnlyEmojis && emojiInformation.emojis.size() == 1);
20+
if (text != null) {
21+
final EmojiInformation emojiInformation = Emojis.emojiInformation(text);
22+
return (emojiInformation.isOnlyEmojis && emojiInformation.getEmojiCount() == 1);
23+
} else {
24+
return false;
25+
}
2226
}
2327
}

0 commit comments

Comments
 (0)