Example #1
0
        async Task ExecuteFavoriteCommandAsync(Session session)
        {
            var toggled = await FavoriteService.ToggleFavorite(session);

            if (toggled && Settings.Current.FavoritesOnly)
            {
                SortSessions();
            }
        }
Example #2
0
        async Task ToggleFavorite(Session session)
        {
            var toggled = await FavoriteService.ToggleFavorite(session);

            if (toggled)
            {
                await ExecuteLoadSessionsCommandAsync();
            }
        }
Example #3
0
        void ExecuteFavoriteCommand(Session session)
        {
            MessagingService.Current.SendMessage <MessagingServiceQuestion>(MessageKeys.Question, new MessagingServiceQuestion
            {
                Negative    = "Cancel",
                Positive    = "Unfavorite",
                Question    = "Are you sure you want to remove this session from your favorites?",
                Title       = "Unfavorite Session",
                OnCompleted = (async(result) =>
                {
                    if (!result)
                    {
                        return;
                    }

                    var toggled = await FavoriteService.ToggleFavorite(session);
                    if (toggled)
                    {
                        await ExecuteLoadSessionsCommandAsync();
                    }
                })
            });
        }
 async Task ExecuteFavoriteCommandAsync()
 {
     await FavoriteService.ToggleFavorite(Session);
 }
Example #5
0
 async Task ToggleFavorite(Session session)
 {
     var toggled = await FavoriteService.ToggleFavorite(session);
 }