protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); KeyDown += OnKeyDownHandler; NavigationMode = e.NavigationMode; if (e.NavigationMode == NavigationMode.New) { GetType().RemovePageFromBackStack(); MultiplePostVM?.ResetCache(); } try { if (e.Parameter != null && e.Parameter is InstaChannel channel) { Channel = channel; } } catch { } }
private void MultiplePostViewLoaded(object sender, RoutedEventArgs e) { if (NavigationMode == NavigationMode.Back && MultiplePostVM.ChannelId != null) { if (MultiplePostVM.ChannelId.ToLower().TrimAnyBullshits() == Channel.ChannelId.ToLower().TrimAnyBullshits()) { return; } } else if (NavigationMode == NavigationMode.New) { NavigationCacheMode = NavigationCacheMode.Enabled; CanLoadFirstPopUp = false; } if (!CanLoadFirstPopUp) { MultiplePostVM.ResetCache(); MultiplePostVM.ChannelId = Channel.ChannelId; MultiplePostVM.FirstMediaId = Channel.Media.InstaIdentifier; MultiplePostVM.Title = Channel.Title; MultiplePostVM.RunLoadMore(true); CanLoadFirstPopUp = true; } }