aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu')
-rw-r--r--src/main/java/eu/siacs/conversations/utils/UIHelper.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/java/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java
index c9b5ea67..bf997bc1 100644
--- a/src/main/java/eu/siacs/conversations/utils/UIHelper.java
+++ b/src/main/java/eu/siacs/conversations/utils/UIHelper.java
@@ -95,10 +95,6 @@ public class UIHelper {
return sameDay(date,new Date(System.currentTimeMillis()));
}
- public static boolean sameDay(long timestamp1, long timestamp2) {
- return sameDay(new Date(timestamp1),new Date(timestamp2));
- }
-
private static boolean sameDay(Date a, Date b) {
Calendar cal1 = Calendar.getInstance();
Calendar cal2 = Calendar.getInstance();
@@ -185,7 +181,9 @@ public class UIHelper {
}
} else {
String body = message.getBody();
- if (body.length() > 256) {
+ if (body == null) {
+ body = "";
+ } else if (body.length() > 256) {
body = body.substring(0,256);
}
if (body.startsWith(Message.ME_COMMAND)) {