diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-04-22 13:47:06 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-04-22 13:47:06 +0200 |
commit | 13f58b1708b37757a7c4e934badcdd09b9aa12d5 (patch) | |
tree | 1375025b1ee490c87a717666fd0b5734dca05e00 /src/main/java | |
parent | 848aa600cb99524d276b9c6ef3f2f3824e6f2dcc (diff) |
make it possible to switch back to single account if only one account available
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/SettingsActivity.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/SettingsActivity.java b/src/main/java/de/pixart/messenger/ui/SettingsActivity.java index 190fc0c43..98f3939b9 100644 --- a/src/main/java/de/pixart/messenger/ui/SettingsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/SettingsActivity.java @@ -245,8 +245,7 @@ public class SettingsActivity extends XmppActivity implements Log.d(Config.LOGTAG, "Multi account checkbox checked: " + isMultiAccountChecked); if (isMultiAccountChecked) { enableMultiAccountsPreference.setEnabled(false); - /* - if (xmppConnectionServiceBound) { // todo doesn't work --> it seems the service is never bound + if (xmppConnectionService != null) { final List<Account> accounts = xmppConnectionService.getAccounts(); Log.d(Config.LOGTAG, "Disabled multi account: Number of accounts " + accounts.size()); if (accounts.size() > 1) { @@ -257,9 +256,9 @@ public class SettingsActivity extends XmppActivity implements enableMultiAccountsPreference.setEnabled(true); } } else { + Log.d(Config.LOGTAG, "Disabled multi account not possible because XmppConnectionService == null"); enableMultiAccountsPreference.setEnabled(false); } - */ } else { enableMultiAccountsPreference.setEnabled(true); enableMultiAccountsPreference.setOnPreferenceClickListener(preference -> { |