private async void WatchlistEpisode_Click(object sender, RoutedEventArgs e) { this.indicator = App.ShowLoading(this); lastModel = (ListItemViewModel)((MenuItem)sender).DataContext; if (await episodeController.addEpisodeToWatchlist(lastModel.Tvdb, lastModel.Imdb, lastModel.Name, lastModel.Year, lastModel.Season, lastModel.Episode)) { lastModel.InWatchList = true; ToastNotification.ShowToast("Show", "Episode added to watchlist."); } else { ErrorManager.ShowConnectionErrorPopup(); } lastModel = null; this.indicator.IsVisible = false; }
private async void WatchlistEpisode_Click(object sender, RoutedEventArgs e) { this.progressBarLoading.Visibility = System.Windows.Visibility.Visible; App.TrackEvent("ViewShow", "Watchlist context"); lastModel = (ListItemViewModel)((MenuItem)sender).DataContext; if (await episodeController.addEpisodeToWatchlist(lastModel.Tvdb, App.ShowViewModel.Imdb, App.ShowViewModel.Name, Int16.Parse(App.ShowViewModel.Year), lastModel.Season, lastModel.Episode)) { lastModel.InWatchList = true; ToastNotification.ShowToast("Show", "Episode added to watchlist."); } else { ErrorManager.ShowConnectionErrorPopup(); } lastModel = null; this.progressBarLoading.Visibility = System.Windows.Visibility.Collapsed; }
private async void AddToWatchList_Click(object sender, EventArgs e) { App.TrackEvent("ViewEpisode", "Watchlist"); progressBarLoading.Visibility = System.Windows.Visibility.Visible; if (await episodeController.addEpisodeToWatchlist(this.show.tvdb_id, this.show.imdb_id, this.show.Title, this.show.year, this.episode.Season, this.episode.Number)) { ToastNotification.ShowToast("Episode", "Episode added to watchlist."); App.EpisodeViewModel.InWatchlist = true; await updateOtherViews(); InitAppBar(); } else { ErrorManager.ShowConnectionErrorPopup(); } progressBarLoading.Visibility = System.Windows.Visibility.Collapsed; }