mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-24 17:52:17 -05:00
optimized heart render code a bit
This commit is contained in:
parent
33d1621e3b
commit
239e86a98a
@ -478,10 +478,7 @@ public class Message extends AbstractEntity {
|
||||
}
|
||||
|
||||
public boolean bodyIsHeart() {
|
||||
return body != null &&
|
||||
(body.trim().equals(UIHelper.BLACK_HEART_SUIT)
|
||||
|| body.trim().equals(UIHelper.HEAVY_BLACK_HEART_SUIT)
|
||||
|| body.trim().equals(UIHelper.WHITE_HEART_SUIT));
|
||||
return body != null && UIHelper.HEARTS.contains(body.trim());
|
||||
}
|
||||
|
||||
public ImageParams getImageParams() {
|
||||
|
@ -1,6 +1,8 @@
|
||||
package eu.siacs.conversations.utils;
|
||||
|
||||
import java.net.URLConnection;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
@ -18,9 +20,11 @@ import android.util.Pair;
|
||||
|
||||
public class UIHelper {
|
||||
|
||||
public static String BLACK_HEART_SUIT = "\u2665";
|
||||
public static String HEAVY_BLACK_HEART_SUIT = "\u2764";
|
||||
public static String WHITE_HEART_SUIT = "\u2661";
|
||||
private static String BLACK_HEART_SUIT = "\u2665";
|
||||
private static String HEAVY_BLACK_HEART_SUIT = "\u2764";
|
||||
private static String WHITE_HEART_SUIT = "\u2661";
|
||||
|
||||
public static final ArrayList<String> HEARTS = new ArrayList<>(Arrays.asList(BLACK_HEART_SUIT,HEAVY_BLACK_HEART_SUIT,WHITE_HEART_SUIT));
|
||||
|
||||
private static final int SHORT_DATE_FLAGS = DateUtils.FORMAT_SHOW_DATE
|
||||
| DateUtils.FORMAT_NO_YEAR | DateUtils.FORMAT_ABBREV_ALL;
|
||||
|
Loading…
Reference in New Issue
Block a user