Skip to content

Commit 3948939

Browse files
authored
Code Quality: Hide search header when navigating to home page (#17470)
1 parent b7dd8cb commit 3948939

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Files.App/Views/Shells/ModernShellPage.xaml.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@ private async void ItemDisplayFrame_Navigated(object sender, NavigationEventArgs
173173
if (parameters.IsLayoutSwitch)
174174
FilesystemViewModel_DirectoryInfoUpdated(sender, EventArgs.Empty);
175175

176+
// Update the ShellViewModel with the current working directory
177+
// Fixes https://github.com/files-community/Files/issues/17469
178+
if (parameters.IsSearchResultPage == false)
179+
ShellViewModel.IsSearchResults = false;
180+
176181
_navigationInteractionTracker.CanNavigateBackward = CanNavigateBackward;
177182
_navigationInteractionTracker.CanNavigateForward = CanNavigateForward;
178183
}

0 commit comments

Comments
 (0)