aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java
diff options
context:
space:
mode:
authorBrianBlade <n.gelbertz@gmail.com>2015-04-01 12:14:05 +0200
committerBrianBlade <n.gelbertz@gmail.com>2015-04-01 12:47:59 +0200
commite64049c4fc0f4514dee011a1f616ea4bdff1f16a (patch)
tree5ab4bb12cb8241af0e88eab14ae39817595618e7 /src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java
parent7eabdfd80f50634282307f45c5f99ab46181805d (diff)
Add toggle account-state switch
Add a switch to AccountAdapter that allows self-contained enabling/disabling of accounts without the need to bring up the context-menu
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java
index b2d5ddfd7..c7db94af6 100644
--- a/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java
@@ -168,6 +168,14 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
}
}
+ public void onClickTglAccountState(Account account) {
+ if (account.isOptionSet(Account.OPTION_DISABLED)) {
+ enableAccount(account);
+ } else {
+ disableAccount(account);
+ }
+ }
+
private void publishAvatar(Account account) {
Intent intent = new Intent(getApplicationContext(),
PublishProfilePictureActivity.class);