fix: sync events only in case persistence is enabled

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2021-07-16 18:32:38 +05:30
committed by xsahil03x
parent 633bcb750d
commit 9a2ec7ca84
@@ -426,7 +426,10 @@ class StreamChatClient {
await queryChannelsOnline(
filter: Filter.in_('cid', cids),
paginationParams: const PaginationParams(limit: 30),
).then((_) => sync(cids: cids, lastSyncAt: _lastSyncedAt));
);
if (persistenceEnabled) {
await sync(cids: cids, lastSyncAt: _lastSyncedAt);
}
}
handleEvent(Event(
type: EventType.connectionRecovered,