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(); } }
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; } }