aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-06-29 22:27:28 +0200
committerChristian Schneppe <christian@pix-art.de>2018-06-29 22:27:28 +0200
commitdda1f862f0d96571e1353e4deefe10bb57a7d269 (patch)
tree12dfdedbcdf7e50be5d66b169374e4357675fb3c /src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java
parentd9d6909c69b57b81380798fabe3a4e2d3d347cb1 (diff)
code clean up in contact details presence handling
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java
index 6ce1e7e70..11cf78858 100644
--- a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java
@@ -72,23 +72,16 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
private OnCheckedChangeListener mOnSendCheckedChange = new OnCheckedChangeListener() {
@Override
- public void onCheckedChanged(CompoundButton buttonView,
- boolean isChecked) {
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (isChecked) {
- if (contact
- .getOption(Contact.Options.PENDING_SUBSCRIPTION_REQUEST)) {
- xmppConnectionService.sendPresencePacket(contact
- .getAccount(),
- xmppConnectionService.getPresenceGenerator()
- .sendPresenceUpdatesTo(contact));
+ if (contact.getOption(Contact.Options.PENDING_SUBSCRIPTION_REQUEST)) {
+ xmppConnectionService.sendPresencePacket(contact.getAccount(), xmppConnectionService.getPresenceGenerator().sendPresenceUpdatesTo(contact));
} else {
contact.setOption(Contact.Options.PREEMPTIVE_GRANT);
}
} else {
contact.resetOption(Contact.Options.PREEMPTIVE_GRANT);
- xmppConnectionService.sendPresencePacket(contact.getAccount(),
- xmppConnectionService.getPresenceGenerator()
- .stopPresenceUpdatesTo(contact));
+ xmppConnectionService.sendPresencePacket(contact.getAccount(), xmppConnectionService.getPresenceGenerator().stopPresenceUpdatesTo(contact));
}
}
};