write roster only for active accounts

This commit is contained in:
Daniel Gultsch 2018-03-18 23:19:23 +01:00
parent 59386e50ac
commit 6779bf2a29
1 changed files with 1 additions and 1 deletions

View File

@ -1057,9 +1057,9 @@ public class XmppConnectionService extends Service {
int activeAccounts = 0; int activeAccounts = 0;
for (final Account account : accounts) { for (final Account account : accounts) {
if (account.getStatus() != Account.State.DISABLED) { if (account.getStatus() != Account.State.DISABLED) {
databaseBackend.writeRoster(account.getRoster());
activeAccounts++; activeAccounts++;
} }
databaseBackend.writeRoster(account.getRoster());
if (account.getXmppConnection() != null) { if (account.getXmppConnection() != null) {
new Thread(() -> disconnect(account, false)).start(); new Thread(() -> disconnect(account, false)).start();
} }