From 4b0ea5c7cd6ca571288788b873c7416ae8606a35 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 22 Feb 2022 13:35:44 -0500 Subject: [PATCH] Need to sync also when gateways change --- .../conversations/services/QuickConversationsService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cheogram/java/eu/siacs/conversations/services/QuickConversationsService.java b/src/cheogram/java/eu/siacs/conversations/services/QuickConversationsService.java index 0da279f82..06aae4c12 100644 --- a/src/cheogram/java/eu/siacs/conversations/services/QuickConversationsService.java +++ b/src/cheogram/java/eu/siacs/conversations/services/QuickConversationsService.java @@ -3,6 +3,7 @@ package eu.siacs.conversations.services; import java.util.concurrent.atomic.AtomicInteger; import java.util.Collection; import java.util.HashMap; +import java.util.Objects; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -116,7 +117,7 @@ public class QuickConversationsService extends AbstractQuickConversationsService } protected boolean considerSync(final Account account, final List gateways, final Map contacts, final boolean forced) { - final int hash = contacts.keySet().hashCode(); + final int hash = Objects.hash(contacts.keySet(), gateways); Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": consider sync of " + hash); if (!mLastSyncAttempt.retry(hash) && !forced) { Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": do not attempt sync");