From 87aff4c6d8ba516bf847b69bab25e5601a3bcd76 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Mon, 21 Jul 2014 15:17:01 +0200 Subject: fixed bug where presence requests where sent on display of contact details --- src/eu/siacs/conversations/ui/ContactDetailsActivity.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/eu') diff --git a/src/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/eu/siacs/conversations/ui/ContactDetailsActivity.java index 2ec6459b..7c13c518 100644 --- a/src/eu/siacs/conversations/ui/ContactDetailsActivity.java +++ b/src/eu/siacs/conversations/ui/ContactDetailsActivity.java @@ -173,9 +173,7 @@ public class ContactDetailsActivity extends XmppActivity { status = (TextView) findViewById(R.id.details_contactstatus); lastseen = (TextView) findViewById(R.id.details_lastseen); send = (CheckBox) findViewById(R.id.details_send_presence); - send.setOnCheckedChangeListener(this.mOnSendCheckedChange); receive = (CheckBox) findViewById(R.id.details_receive_presence); - receive.setOnCheckedChangeListener(this.mOnReceiveCheckedChange); badge = (QuickContactBadge) findViewById(R.id.details_contact_badge); keys = (LinearLayout) findViewById(R.id.details_contact_keys); getActionBar().setHomeButtonEnabled(true); @@ -232,6 +230,8 @@ public class ContactDetailsActivity extends XmppActivity { } private void populateView() { + send.setOnCheckedChangeListener(null); + receive.setOnCheckedChangeListener(null); setTitle(contact.getDisplayName()); if (contact.getOption(Contact.Options.FROM)) { send.setText(R.string.send_presence_updates); @@ -267,6 +267,9 @@ public class ContactDetailsActivity extends XmppActivity { send.setEnabled(false); } + send.setOnCheckedChangeListener(this.mOnSendCheckedChange); + receive.setOnCheckedChangeListener(this.mOnReceiveCheckedChange); + lastseen.setText(UIHelper.lastseen(getApplicationContext(), contact.lastseen.time)); -- cgit v1.2.3