Ejemplo n.º 1
0
        async Task ExecuteFavoriteCommandAsync(Session session)
        {
            var toggled = await FavoriteService.ToggleFavorite(session);

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

            if (toggled)
            {
                await ExecuteLoadSessionsCommandAsync();
            }
        }
Ejemplo n.º 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();
                    }
                })
            });
        }
Ejemplo n.º 4
0
 async Task ExecuteFavoriteCommandAsync()
 {
     await FavoriteService.ToggleFavorite(Session);
 }
Ejemplo n.º 5
0
 async Task ToggleFavorite(Session session)
 {
     var toggled = await FavoriteService.ToggleFavorite(session);
 }