From 4ed74eafc881832dc684164a6d7d3ba32c7b5860 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 12 Aug 2017 22:17:49 +0200 Subject: [PATCH] reset attempt counts on enable --- .../eu/siacs/conversations/ui/ManageAccountActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java index 0f6b58ef0..72a0abba1 100644 --- a/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java @@ -31,6 +31,7 @@ import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.services.XmppConnectionService.OnAccountUpdate; import eu.siacs.conversations.ui.adapter.AccountAdapter; +import eu.siacs.conversations.xmpp.XmppConnection; import eu.siacs.conversations.xmpp.jid.InvalidJidException; import eu.siacs.conversations.xmpp.jid.Jid; @@ -334,6 +335,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(); }