public override void OnNavigatedTo(INavigationParameters parameters) { var sortKey = Preferences.Get(PreferenceKeys.SortKey, SortOptions.ByLastViewed.ToString()); var options = (SortOptions)Enum.Parse(typeof(SortOptions), sortKey); var filterKey = Preferences.Get(PreferenceKeys.FilterKey, ""); FilterOptions = FilterOptions.FromString(filterKey); SortOptions = options; }
private async Task GetShows(bool forceRefresh = false) { var sortKey = Preferences.Get(PreferenceKeys.SortKey, SortOptions.ByLastViewed.ToString()); var options = (SortOptions)Enum.Parse(typeof(SortOptions), sortKey); var filterKey = Preferences.Get(PreferenceKeys.FilterKey, ""); var filterOptions = FilterOptions.FromString(filterKey); var shows = _showService.GetMyShows(filterOptions, options, forceRefresh); Shows = new ObservableCollection <TraktShow>(); await foreach (var show in shows) { Shows.Add(show); } }