public async void Reload() { await Task.Run(() => { EnabledPacks.Clear(); DisabledPacks.Clear(); var(enabledPacks, disabledPacks) = _resourcePackService.LoadAll(); EnabledPacks.AddRange(enabledPacks); DisabledPacks.AddRange(disabledPacks); }); }
public async void Reload() { EnabledPacks.Clear(); DisabledPacks.Clear(); foreach (var pack in await _resourcePackService.LoadAllAsync()) { if (pack.IsEnabled) { EnabledPacks.Add(pack); } else { DisabledPacks.Add(pack); } } }