diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-07-21 15:17:01 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-07-21 15:17:01 +0200 |
commit | 87aff4c6d8ba516bf847b69bab25e5601a3bcd76 (patch) | |
tree | 6fdb00bbf1a42cba5b702cd5c612e665c4f36129 /src/eu/siacs/conversations | |
parent | aa844df1449937b3858c5a8a7fe2f5e2794a7332 (diff) |
fixed bug where presence requests where sent on display of contact details
Diffstat (limited to 'src/eu/siacs/conversations')
-rw-r--r-- | src/eu/siacs/conversations/ui/ContactDetailsActivity.java | 7 |
1 files changed, 5 insertions, 2 deletions
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)); |