Example #1
0
 public override async Task HandleNavigation(IReadOnlyDictionary <string, object> parameters = null)
 {
     try
     {
         LoadingHistories = HasHistories = true;
         await ManageFavorites();
         await ManageDiscover();
     }
     catch (Exception e)
     {
         await Alerts.CallAlertAsync(e);
     }
     finally
     {
         LoadingHistories = false;
         HasHistories     = DiscoverWorks.Any();
     }
 }
Example #2
0
        private async Task SearchHistories(string search)
        {
            try
            {
                DiscoverWorks.Clear();
                var works = await Service.SearchWorks(search);

                works.ForEach(DiscoverWorks.Add);
            }
            catch (Exception ex)
            {
                await Alerts.CallAlertAsync(ex);
            }
            finally
            {
                HasHistories       = DiscoverWorks.Any();
                LoadingHistories   = false;
                DiscoverRefreshing = false;
            }
        }