public async Task NotifyForExistingRequestAsync(string userId, TvShow tvShow, TvSeason selectedSeason)
 {
     if (_notificationsRepository.HasSeasonNotification(userId, tvShow.TheTvDbId, selectedSeason))
     {
         await _userInterface.WarnAlreadyNotifiedForSeasonsAsync(tvShow, selectedSeason);
     }
     else
     {
         await _userInterface.AskForSeasonNotificationRequestAsync(tvShow, selectedSeason);
     }
 }
Exemple #2
0
        private async Task RequestNotificationsForSeasonAsync(TvShow tvShow, FutureTvSeasons selectedSeason)
        {
            if (_notificationRequestRepository.HasSeasonNotification(_user.UserId, tvShow.TheTvDbId, selectedSeason))
            {
                await _userInterface.WarnAlreadyNotifiedForSeasonsAsync(tvShow, selectedSeason);
            }
            else
            {
                var isRequested = await _userInterface.AskForSeasonNotificationRequestAsync(tvShow, selectedSeason);

                if (isRequested)
                {
                    _notificationRequestRepository.AddSeasonNotification(_user.UserId, tvShow.TheTvDbId, selectedSeason);
                    await _userInterface.DisplayNotificationSuccessForSeasonAsync(selectedSeason);
                }
            }
        }