diff options
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/utils/Namespace.java | 1 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/utils/UIHelper.java | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/utils/Namespace.java b/src/main/java/de/pixart/messenger/utils/Namespace.java index bc6d56752..a384712db 100644 --- a/src/main/java/de/pixart/messenger/utils/Namespace.java +++ b/src/main/java/de/pixart/messenger/utils/Namespace.java @@ -9,4 +9,5 @@ public final class Namespace { public static final String STANZA_IDS = "urn:xmpp:sid:0"; public static final String MAM = "urn:xmpp:mam:2"; public static final String MAM_LEGACY = "urn:xmpp:mam:0"; + public static final String IDLE = "urn:xmpp:idle:1"; } diff --git a/src/main/java/de/pixart/messenger/utils/UIHelper.java b/src/main/java/de/pixart/messenger/utils/UIHelper.java index 05d6c2706..68f9297e9 100644 --- a/src/main/java/de/pixart/messenger/utils/UIHelper.java +++ b/src/main/java/de/pixart/messenger/utils/UIHelper.java @@ -112,8 +112,9 @@ public class UIHelper { public static String lastseen(Context context, boolean active, long time) { long difference = (System.currentTimeMillis() - time) / 1000; - active = active && difference <= 300; - if (active || difference < 60) { + if (active) { + return context.getString(R.string.last_seen_now); + } else if (difference < 60) { return context.getString(R.string.last_seen_now); } else if (difference < 60 * 2) { return context.getString(R.string.last_seen_min); |