diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-09-07 14:34:58 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-09-08 22:54:18 +0200 |
commit | 8adf715f7cd259c1b27a6125720e88b2e765863f (patch) | |
tree | b7968ab440050631aa4949c7b3d4dc084e7ecf12 /src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java | |
parent | 299e4bb9ff1994fedd37cb16667f04c1bca50fd4 (diff) |
be a bit more careful when deleting and deactivating accounts
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java b/src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java index 81e553bd5..edf4481b5 100644 --- a/src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java @@ -303,12 +303,16 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda private void disableAccount(Account account) { account.setOption(Account.OPTION_DISABLED, true); - xmppConnectionService.updateAccount(account); + if (!xmppConnectionService.updateAccount(account)) { + Toast.makeText(this,R.string.unable_to_update_account,Toast.LENGTH_SHORT).show(); + } } private void enableAccount(Account account) { account.setOption(Account.OPTION_DISABLED, false); - xmppConnectionService.updateAccount(account); + if (!xmppConnectionService.updateAccount(account)) { + Toast.makeText(this,R.string.unable_to_update_account,Toast.LENGTH_SHORT).show(); + } } private void publishOpenPGPPublicKey(Account account) { |