refactor(sidebar): let the channel header resolve the same icon

Visibility only. The header has to show the icon the sidebar row shows, and the
lookup table alone would not do it: it only answers for a tab with an explicitly
chosen icon, and the default is none. Most tabs reach their icon through the
derivation this method wraps.
This commit is contained in:
2026-08-19 09:52:49 +02:00
parent 64f7d9b975
commit 0551116a0c
+5 -1
View File
@@ -486,7 +486,11 @@ internal sealed class Sidebar
ImGui.PopID(); ImGui.PopID();
} }
private static FontAwesomeIcon ResolveTabIcon(Tab tab) // internal since v1.13.0: the channel header shows the same icon as the row
// in here, and it has to resolve it the same way. IconByName alone would not
// do -- it only answers for a tab with an explicitly chosen icon, and the
// default is none, so most tabs fall through to the derivation below.
internal static FontAwesomeIcon ResolveTabIcon(Tab tab)
{ {
if ( if (
!string.IsNullOrWhiteSpace(tab.Icon) && IconByName.TryGetValue(tab.Icon, out var mapped) !string.IsNullOrWhiteSpace(tab.Icon) && IconByName.TryGetValue(tab.Icon, out var mapped)