/// <summary> /// Returns updated messages ids /// </summary> public async Task UpdateDialogsFromApiByIds(IReadOnlyCollection <int> dialogIds) { var newDialogs = await DialogsClient.GetDialogsByIds(dialogIds); if (newDialogs.Any()) { AddUpdateDialogsInCollection(newDialogs, false); // ReSharper disable once InconsistentlySynchronizedField await DurableCacheManager.SaveDialogs(collection); } }
public async Task UpdateDialogsFromApi() { var newDialogs = await DialogsClient.GetDialogs(); if (newDialogs.Any()) { AddUpdateDialogsInCollection(newDialogs, true); // ReSharper disable once InconsistentlySynchronizedField await DurableCacheManager.SaveDialogs(collection); } }