mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 03:32:15 -05:00
reset attempt counts on enable
This commit is contained in:
parent
699e845e6d
commit
4ed74eafc8
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user