Skip to content

Commit fa481b0

Browse files
Fix - Selecting a tag on the sidebar doesn't highlight it (#9766)
1 parent 2d406ff commit fa481b0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Files.Uwp/Views/MainPage.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,8 @@ private void SidebarControl_SidebarItemInvoked(object sender, SidebarItemInvoked
326326
IsSearchResultPage = true,
327327
SearchPathParam = "Home".GetLocalized(),
328328
SearchQuery = tagPath,
329-
AssociatedTabInstance = shp
329+
AssociatedTabInstance = shp,
330+
NavPathParam = tagPath
330331
});
331332
}
332333
return;

src/Files.Uwp/Views/ModernShellPage.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,10 +669,11 @@ private async void ItemDisplayFrame_Navigated(object sender, NavigationEventArgs
669669
ContentPage.ResetItemOpacity();
670670
}
671671
var parameters = e.Parameter as NavigationArguments;
672+
var isTagSearch = parameters.NavPathParam is not null && parameters.NavPathParam.StartsWith("tag:");
672673
TabItemArguments = new TabItemArguments()
673674
{
674675
InitialPageType = typeof(ModernShellPage),
675-
NavigationArg = parameters.IsSearchResultPage ? parameters.SearchPathParam : parameters.NavPathParam
676+
NavigationArg = parameters.IsSearchResultPage && !isTagSearch ? parameters.SearchPathParam : parameters.NavPathParam
676677
};
677678
}
678679

0 commit comments

Comments
 (0)