From 7a99e13462fde47d07719153ce74fe78381a764b Mon Sep 17 00:00:00 2001 From: Christian S Date: Mon, 19 Oct 2015 21:33:29 +0200 Subject: show lastseen as subtitle in chatview --- src/main/java/eu/siacs/conversations/ui/ConversationActivity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java index b3765a080..451dd41ee 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java @@ -54,6 +54,7 @@ import eu.siacs.conversations.services.XmppConnectionService.OnConversationUpdat import eu.siacs.conversations.services.XmppConnectionService.OnRosterUpdate; import eu.siacs.conversations.ui.adapter.ConversationAdapter; import eu.siacs.conversations.utils.ExceptionHelper; +import eu.siacs.conversations.utils.UIHelper; import eu.siacs.conversations.xmpp.OnUpdateBlocklist; import eu.siacs.conversations.xmpp.chatstate.ChatState; import eu.siacs.conversations.xmpp.jid.InvalidJidException; @@ -370,9 +371,9 @@ public class ConversationActivity extends XmppActivity if (state == ChatState.COMPOSING) { ab.setSubtitle(getString(R.string.is_typing)); } else if (state == ChatState.PAUSED) { - ab.setSubtitle(null); + ab.setSubtitle(UIHelper.lastseen(getApplicationContext(), conversation.getContact().lastseen.time)); } else { - ab.setSubtitle(null); + ab.setSubtitle(UIHelper.lastseen(getApplicationContext(), conversation.getContact().lastseen.time)); } } else if (useSubjectToIdentifyConference()){ ab.setSubtitle(conversation.getParticipants()); -- cgit v1.2.3