public async void Init(CharacterDetailsNavigationArgs args, bool force = false) { if (Data != null) { ViewModelLocator.GeneralMain.CurrentOffStatus = Data.Name; ViewModelLocator.GeneralMain.IsCurrentStatusSelectable = true; } if (!force && (_prevArgs?.Equals(args) ?? false)) { return; } if (args.ResetNav && !ViewModelLocator.NavMgr.HasSomethingOnStack()) { ViewModelLocator.NavMgr.ResetMainBackNav(); ViewModelLocator.NavMgr.RegisterBackNav(PageIndex.PageAnimeList, null); } Loading = true; _prevArgs = args; Data = await new CharacterDetailsQuery(args.Id).GetCharacterDetails(force); SpoilerButtonVisibility = !string.IsNullOrEmpty(Data.SpoilerContent); AnimeographyVisibility = Data.Animeography.Any(); MangaographyVisibility = Data.Mangaography.Any(); VoiceActors = Data.VoiceActors.Select(actor => new FavouriteViewModel(actor)).ToList(); RaisePropertyChanged(() => FavouriteViewModel); ViewModelLocator.GeneralMain.CurrentOffStatus = Data.Name; ViewModelLocator.GeneralMain.IsCurrentStatusSelectable = true; Loading = false; }
public CharacterDetailsPageFragment(CharacterDetailsNavigationArgs args) { _args = args; }
protected override void OnNavigatedTo(NavigationEventArgs e) { _lastArgs = e.Parameter as CharacterDetailsNavigationArgs; base.OnNavigatedTo(e); }