fixed bug where presence requests where sent on display of contact details
This commit is contained in:
parent
aa844df144
commit
87aff4c6d8
|
@ -173,9 +173,7 @@ public class ContactDetailsActivity extends XmppActivity {
|
||||||
status = (TextView) findViewById(R.id.details_contactstatus);
|
status = (TextView) findViewById(R.id.details_contactstatus);
|
||||||
lastseen = (TextView) findViewById(R.id.details_lastseen);
|
lastseen = (TextView) findViewById(R.id.details_lastseen);
|
||||||
send = (CheckBox) findViewById(R.id.details_send_presence);
|
send = (CheckBox) findViewById(R.id.details_send_presence);
|
||||||
send.setOnCheckedChangeListener(this.mOnSendCheckedChange);
|
|
||||||
receive = (CheckBox) findViewById(R.id.details_receive_presence);
|
receive = (CheckBox) findViewById(R.id.details_receive_presence);
|
||||||
receive.setOnCheckedChangeListener(this.mOnReceiveCheckedChange);
|
|
||||||
badge = (QuickContactBadge) findViewById(R.id.details_contact_badge);
|
badge = (QuickContactBadge) findViewById(R.id.details_contact_badge);
|
||||||
keys = (LinearLayout) findViewById(R.id.details_contact_keys);
|
keys = (LinearLayout) findViewById(R.id.details_contact_keys);
|
||||||
getActionBar().setHomeButtonEnabled(true);
|
getActionBar().setHomeButtonEnabled(true);
|
||||||
|
@ -232,6 +230,8 @@ public class ContactDetailsActivity extends XmppActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void populateView() {
|
private void populateView() {
|
||||||
|
send.setOnCheckedChangeListener(null);
|
||||||
|
receive.setOnCheckedChangeListener(null);
|
||||||
setTitle(contact.getDisplayName());
|
setTitle(contact.getDisplayName());
|
||||||
if (contact.getOption(Contact.Options.FROM)) {
|
if (contact.getOption(Contact.Options.FROM)) {
|
||||||
send.setText(R.string.send_presence_updates);
|
send.setText(R.string.send_presence_updates);
|
||||||
|
@ -267,6 +267,9 @@ public class ContactDetailsActivity extends XmppActivity {
|
||||||
send.setEnabled(false);
|
send.setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
send.setOnCheckedChangeListener(this.mOnSendCheckedChange);
|
||||||
|
receive.setOnCheckedChangeListener(this.mOnReceiveCheckedChange);
|
||||||
|
|
||||||
lastseen.setText(UIHelper.lastseen(getApplicationContext(),
|
lastseen.setText(UIHelper.lastseen(getApplicationContext(),
|
||||||
contact.lastseen.time));
|
contact.lastseen.time));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue