aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-08-13 23:28:46 +0200
committerChristian Schneppe <christian@pix-art.de>2017-08-13 23:28:46 +0200
commita429c052b7818d2668a9235fcee3265024ecb84d (patch)
treef4266fd229184acfb0ad2c40d63d3e7cbee94e62 /src/main/java/de/pixart
parentae453655bae095bb8e9959173654da9148ceff1e (diff)
reset attempt counts on enable
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java b/src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java
index 66d1330ef..ffd904e5e 100644
--- a/src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java
@@ -33,6 +33,7 @@ import de.pixart.messenger.entities.Account;
import de.pixart.messenger.services.XmppConnectionService;
import de.pixart.messenger.services.XmppConnectionService.OnAccountUpdate;
import de.pixart.messenger.ui.adapter.AccountAdapter;
+import de.pixart.messenger.xmpp.XmppConnection;
import de.pixart.messenger.xmpp.jid.InvalidJidException;
import de.pixart.messenger.xmpp.jid.Jid;
@@ -319,6 +320,10 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
private void enableAccount(Account account) {
account.setOption(Account.OPTION_DISABLED, false);
+ final XmppConnection connection = account.getXmppConnection();
+ if (connection != null) {
+ connection.resetEverything();
+ }
if (!xmppConnectionService.updateAccount(account)) {
Toast.makeText(this, R.string.unable_to_update_account, Toast.LENGTH_SHORT).show();
}