예제 #1
0
        private async Task ExecuteFavoriteCommandAsync(SessionCellViewViewModel session)
        {
            var toggled = await FavoriteService.ToggleFavorite(session.SelectedSession);

            if (toggled && Settings.FavoritesOnly)
            {
                SortSessions();
            }
        }
예제 #2
0
        private async Task ExecuteFavoriteCommand(SessionCellViewViewModel session)
        {
            if (session?.SelectedSession == null)
            {
                return;
            }

            var response = await PageDialogService.DisplayAlertAsync("Unfavorite Session",
                                                                     "Are you sure you want to remove this session from your favorites?",
                                                                     "Unfavorite",
                                                                     "Cancel");

            if (response)
            {
                var toggled = await FavoriteService.ToggleFavorite(session.SelectedSession);

                if (toggled)
                {
                    await ExecuteLoadSessionsCommandAsync();
                }
            }
        }