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

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();
} }