public async void LoadPinnedTopics() { if (_pinnedTopicsLoaded) { return; } _pinnedTopicsLoaded = true; foreach (var item in (await ResourceLocator.DataCacheService.RetrieveDataRoaming <List <ForumTopicLightEntry> >("pinned_forum_topics.json", -1)) ?? new List <ForumTopicLightEntry>()) { PinnedTopics.Add(item); } }
public async Task SavePinnedTopics() { await ResourceLocator.DataCacheService.SaveDataRoaming(PinnedTopics.ToList(), "pinned_forum_topics.json"); }