diff --git a/Files/BaseLayout.cs b/Files/BaseLayout.cs index f2baeb3c3c64..22f7e1a6365b 100644 --- a/Files/BaseLayout.cs +++ b/Files/BaseLayout.cs @@ -182,6 +182,7 @@ protected override async void OnNavigatedTo(NavigationEventArgs eventArgs) { App.CurrentInstance.NavigationToolbar.CanNavigateToParent = true; } + App.InteractionViewModel.IsPageTypeNotHome = true; // show controls that were hidden on the home page await App.CurrentInstance.ViewModel.RefreshItems(); diff --git a/Files/UserControls/ModernSidebar.xaml.cs b/Files/UserControls/ModernSidebar.xaml.cs index 711b7c55dad5..d72c637284ea 100644 --- a/Files/UserControls/ModernSidebar.xaml.cs +++ b/Files/UserControls/ModernSidebar.xaml.cs @@ -117,8 +117,6 @@ private void Sidebar_ItemInvoked(Microsoft.UI.Xaml.Controls.NavigationView sende App.CurrentInstance.ContentFrame.Navigate(typeof(PhotoAlbum), NavigationPath, new SuppressNavigationTransitionInfo()); } - App.InteractionViewModel.IsPageTypeNotHome = true; // show controls that were hidden on the home page - App.CurrentInstance.NavigationToolbar.PathControlDisplayText = App.CurrentInstance.ViewModel.WorkingDirectory; } diff --git a/Files/UserControls/YourHome.xaml.cs b/Files/UserControls/YourHome.xaml.cs index 5da262b5147c..fdcc2873f673 100644 --- a/Files/UserControls/YourHome.xaml.cs +++ b/Files/UserControls/YourHome.xaml.cs @@ -44,6 +44,7 @@ private void OpenFileLocation_Click(object sender, RoutedEventArgs e) protected override void OnNavigatedTo(NavigationEventArgs eventArgs) { base.OnNavigatedTo(eventArgs); + App.InteractionViewModel.IsPageTypeNotHome = false; var parameters = eventArgs.Parameter.ToString(); Locations.ItemLoader.itemsAdded.Clear(); Locations.ItemLoader.DisplayItems(); @@ -127,8 +128,6 @@ private void Button_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEven App.CurrentInstance.ContentFrame.Navigate(typeof(PhotoAlbum), NavigationPath); // Grid View break; } - - App.InteractionViewModel.IsPageTypeNotHome = true; // show controls that were hidden on the home page } public static StorageFile RecentsFile; diff --git a/Files/Views/Pages/ModernShellPage.xaml.cs b/Files/Views/Pages/ModernShellPage.xaml.cs index e7463096a1a3..1f1d1c108031 100644 --- a/Files/Views/Pages/ModernShellPage.xaml.cs +++ b/Files/Views/Pages/ModernShellPage.xaml.cs @@ -168,7 +168,6 @@ private void ItemDisplayFrame_Navigated(object sender, NavigationEventArgs e) { if (ItemDisplayFrame.CurrentSourcePageType == typeof(GenericFileBrowser)) { - App.InteractionViewModel.IsPageTypeNotHome = true; // Reset DataGrid Rows that may be in "cut" command mode IEnumerable items = (ItemDisplayFrame.Content as GenericFileBrowser).AllView.ItemsSource; if (items == null) @@ -182,7 +181,6 @@ private void ItemDisplayFrame_Navigated(object sender, NavigationEventArgs e) } else if (App.CurrentInstance.CurrentPageType == typeof(PhotoAlbum)) { - App.InteractionViewModel.IsPageTypeNotHome = true; // Reset Photo Grid items that may be in "cut" command mode foreach (ListedItem listedItem in (ItemDisplayFrame.Content as PhotoAlbum).FileList.Items) { @@ -195,10 +193,6 @@ private void ItemDisplayFrame_Navigated(object sender, NavigationEventArgs e) imageOfItem.Opacity = 1; } } - else if (App.CurrentInstance.CurrentPageType == typeof(YourHome)) - { - App.InteractionViewModel.IsPageTypeNotHome = false; - } } public void UpdateProgressFlyout(InteractionOperationType operationType, int amountComplete, int amountTotal)