From a429c052b7818d2668a9235fcee3265024ecb84d Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sun, 13 Aug 2017 23:28:46 +0200 Subject: reset attempt counts on enable --- src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main') 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(); } -- cgit v1.2.3