diff options
author | kruks23 <scardenas@openmailbox.org> | 2014-07-10 18:04:24 +0200 |
---|---|---|
committer | kruks23 <scardenas@openmailbox.org> | 2014-07-10 18:04:24 +0200 |
commit | bb6e732ca1306939291796e5c878e1967f0b9c8e (patch) | |
tree | 3d0253392406d369094b7d76125436bd64fdba01 /src/eu/siacs/conversations | |
parent | 8379f695166ee9888e6e1221894c7d1494669a6d (diff) |
Show time in messages previous days
Diffstat (limited to 'src/eu/siacs/conversations')
-rw-r--r-- | src/eu/siacs/conversations/utils/UIHelper.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/utils/UIHelper.java b/src/eu/siacs/conversations/utils/UIHelper.java index 9fd16c43..97accb58 100644 --- a/src/eu/siacs/conversations/utils/UIHelper.java +++ b/src/eu/siacs/conversations/utils/UIHelper.java @@ -54,7 +54,7 @@ public class UIHelper { private static final int FG_COLOR = 0xFFFAFAFA; private static final int TRANSPARENT = 0x00000000; private static final int DATE_NO_YEAR_FLAGS = DateUtils.FORMAT_SHOW_DATE - | DateUtils.FORMAT_NO_YEAR | DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_ABBREV_ALL; + | DateUtils.FORMAT_NO_YEAR | DateUtils.FORMAT_ABBREV_ALL; public static String readableTimeDifference(Context context, long time) { if (time == 0) { @@ -69,7 +69,7 @@ public class UIHelper { } else if (difference < 60 * 15) { return context.getString(R.string.minutes_ago, Math.round(difference / 60.0)); - } else if (today(date)) { + } else if (today(date) || difference < 12 * 60 * 60) { java.text.DateFormat df = DateFormat.getTimeFormat(context); return df.format(date); } else { |