aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-05-14 23:47:31 +0200
committerChristian Schneppe <christian@pix-art.de>2016-05-14 23:47:31 +0200
commit8668ec81b316e0b885ed79b0948eb08be43f2ba4 (patch)
tree951d5a36dd69358b55bc976b05eb1ddeb20cc56a
parent62111a544d3044e2f3597e2251f1b4d77072369b (diff)
readd last seen info to contactDetails
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java
index 339adc28f..137d60611 100644
--- a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java
@@ -44,7 +44,6 @@ import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.Contact;
import eu.siacs.conversations.entities.Conversation;
import eu.siacs.conversations.entities.ListItem;
-import eu.siacs.conversations.entities.Presence;
import eu.siacs.conversations.services.XmppConnectionService.OnAccountUpdate;
import eu.siacs.conversations.services.XmppConnectionService.OnRosterUpdate;
import eu.siacs.conversations.utils.CryptoHelper;
@@ -110,6 +109,7 @@ public class ContactDetailsActivity extends XmppActivity implements OnAccountUpd
private Jid contactJid;
private TextView contactJidTv;
private TextView accountJidTv;
+ private TextView lastseen;
private TextView statusMessage;
private CheckBox send;
private CheckBox receive;
@@ -206,6 +206,7 @@ public class ContactDetailsActivity extends XmppActivity implements OnAccountUpd
contactJidTv = (TextView) findViewById(R.id.details_contactjid);
accountJidTv = (TextView) findViewById(R.id.details_account);
+ lastseen = (TextView) findViewById(R.id.details_lastseen);
statusMessage = (TextView) findViewById(R.id.status_message);
send = (CheckBox) findViewById(R.id.details_send_presence);
receive = (CheckBox) findViewById(R.id.details_receive_presence);
@@ -389,6 +390,12 @@ public class ContactDetailsActivity extends XmppActivity implements OnAccountUpd
statusMessage.setVisibility(View.GONE);
}
+ if (contact.isBlocked() && !this.showDynamicTags) {
+ lastseen.setText(R.string.contact_blocked);
+ } else {
+ lastseen.setText(UIHelper.lastseen(getApplicationContext(), contact.lastseen.time));
+ }
+
if (contact.getPresences().size() > 1) {
contactJidTv.setText(contact.getDisplayJid() + " ("
+ contact.getPresences().size() + ")");