private async Task ExecuteFavoriteCommandAsync(WorkshopCellViewViewModel workshop) { var toggled = await FavoriteService.ToggleFavorite(workshop.SelectedWorkshop); if (toggled && Settings.FavoritesOnly) { SortWorkshops(); } }
private async Task ExecuteFavoriteWorkshopCommand(WorkshopCellViewViewModel workshop) { if (workshop?.SelectedWorkshop == null) { return; } var response = await PageDialogService.DisplayAlertAsync("Unfavorite workshop", "Are you sure you want to remove this workshop from your favorites?", "Unfavorite", "Cancel"); if (response) { var toggled = await FavoriteService.ToggleFavorite(workshop.SelectedWorkshop); if (toggled) { await ExecuteLoadWorkshopsCommandAsync(); } } }