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

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

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