public async void Populate() { if (SubsonicService.HasValidSubsonicUrl) { await SubsonicService.GetMusicFolders().WithErrorHandler(this).OnSuccess(SetMenuItems).Execute(); if (MenuItems.Count == 1) { NavigationService.NavigateToViewModel <IndexViewModel>(MenuItems[0].Item.Id); } } else { await ShowSettingsNotFoundDialog(); DialogService.ShowSettings <SettingsViewModel>(); } }
public void GetMusicFoldersAlwaysReturnsAGetRootResult() { var result = _subject.GetMusicFolders(); result.Should().BeOfType <GetRootResult>(); }
public async Task <IActionResult> GetMusicFolders(SubsonicRequest request) { var result = await SubsonicService.GetMusicFolders(request).ConfigureAwait(false); return(BuildResponse(request, result, "musicFolders")); }
protected override async Task AfterPopulate(int id) { var result = SubsonicService.GetMusicFolders(); await result.WithErrorHandler(ErrorDialogViewModel).OnSuccess(r => SetIndexName(r, id)).Execute(); }
protected override IServiceResultBase <IList <MusicFolder> > GetResult(bool parameter) { return(SubsonicService.GetMusicFolders()); }
protected override async Task AfterLoadModel(int id) { var result = SubsonicService.GetMusicFolders(); await result.WithErrorHandler(this).OnSuccess(r => SetIndexName(r, id)).Execute(); }