From cb8846a7a3310f8513989da5aadb5202f048a1b3 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Mon, 14 Aug 2023 19:46:11 +0200 Subject: Code cleanup --- LibMatrix/Helpers/SyncHelper.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'LibMatrix/Helpers') diff --git a/LibMatrix/Helpers/SyncHelper.cs b/LibMatrix/Helpers/SyncHelper.cs index 2015eaa..b957c0c 100644 --- a/LibMatrix/Helpers/SyncHelper.cs +++ b/LibMatrix/Helpers/SyncHelper.cs @@ -76,10 +76,9 @@ public class SyncHelper { .Where(x => x.StartsWith("sync")) .ToList() .Select(x => _storageService.CacheStorageProvider.DeleteObjectAsync(x))); - SyncResult? sync = null; - string? nextBatch = since; + var nextBatch = since; while (cancellationToken is null || !cancellationToken.Value.IsCancellationRequested) { - sync = await Sync(since: nextBatch, timeout: timeout, setPresence: setPresence, filter: filter, + var sync = await Sync(since: nextBatch, timeout: timeout, setPresence: setPresence, filter: filter, cancellationToken: cancellationToken); nextBatch = sync?.NextBatch ?? nextBatch; if (sync is null) continue; -- cgit 1.4.1