private async void LoadData(LastAlbum album) { IsLoading = true; try { Album = await _service.GetDetailAlbum(album.Name, album.ArtistName); if (Album == null) { CurtainPrompt.ShowError("AppNetworkIssue".FromLanguageResource()); return; } if (Album.Tracks == null && Album.Name.Contains("Deluxe Edition")) { Album = await _service.GetDetailAlbum(album.Name.Replace("(Deluxe Edition)", ""), album.ArtistName); if (Album == null) { CurtainPrompt.ShowError("AppNetworkIssue".FromLanguageResource()); return; } } if (Album.Tracks != null) { Tracks = new ObservableCollection <LastTrack>(Album.Tracks); } else { CurtainPrompt.ShowError("AlbumNoTracks".FromLanguageResource()); } } catch (Exception e) { CurtainPrompt.ShowError("AppNetworkIssue".FromLanguageResource()); } IsLoading = false; }
private async void LoadData(LastAlbum album) { IsLoading = true; try { Album = await _service.GetDetailAlbum(album.Name, album.ArtistName); Tracks = new ObservableCollection <LastTrack>(Album.Tracks); } catch (Exception e) { CurtainToast.ShowError(e.Message); } IsLoading = false; }