public async void LoadIndexesAsync(ISonicCache cache) { var x = new MusicFolders(cache); await LoadIndexesOperation.RunAsync(() => x.GetAsync(SourcePolicy.Cache), e => { }); Indexes.StableMergeUpdate(x.Folders.First().Indexes); }
public IndexesViewModel(ISonicCache cache) { LoadIndexesOperation = new LongRunningOperation(); LoadIndexesAsync(cache); RefreshCommand = new RelayCommand(async () => { ArbitraryContainer.Default.Resolve<INavigationService>().ClearPageCache(); var x = new MusicFolders(cache); await x.GetAsync(SourcePolicy.Refresh); Indexes.StableMergeUpdate(x.Folders.First().Indexes); }); DirectoryClickedCommand = new RelayCommand<MusicDirectory>( x => ArbitraryContainer.Default.Resolve<INavigationService>().Navigate(typeof(MusicDirectoryView), x)); }