From 0949a6cca0b8254e081cfd1d9ac9c33ad50c5b02 Mon Sep 17 00:00:00 2001 From: Yair <39923744+yaira2@users.noreply.github.com> Date: Tue, 19 Aug 2025 10:38:35 -0400 Subject: [PATCH] Code Quality: Hide search header when navigating to home page --- src/Files.App/Views/Shells/ModernShellPage.xaml.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Files.App/Views/Shells/ModernShellPage.xaml.cs b/src/Files.App/Views/Shells/ModernShellPage.xaml.cs index ed83ff0a2f6e..31fd362725bf 100644 --- a/src/Files.App/Views/Shells/ModernShellPage.xaml.cs +++ b/src/Files.App/Views/Shells/ModernShellPage.xaml.cs @@ -173,6 +173,11 @@ private async void ItemDisplayFrame_Navigated(object sender, NavigationEventArgs if (parameters.IsLayoutSwitch) FilesystemViewModel_DirectoryInfoUpdated(sender, EventArgs.Empty); + // Update the ShellViewModel with the current working directory + // Fixes https://github.com/files-community/Files/issues/17469 + if (parameters.IsSearchResultPage == false) + ShellViewModel.IsSearchResults = false; + _navigationInteractionTracker.CanNavigateBackward = CanNavigateBackward; _navigationInteractionTracker.CanNavigateForward = CanNavigateForward; }