From f6fde487674c3b9052ea3a3fea18e6cc3fbb8736 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Wed, 16 Sep 2026 21:14:22 +0200 Subject: [PATCH] Rebuild the sidebar switcher menu when the context name changes --- Yattee/Views/Components/DataContextSwitcherMenu.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Yattee/Views/Components/DataContextSwitcherMenu.swift b/Yattee/Views/Components/DataContextSwitcherMenu.swift index 1b12a344..92ed1815 100644 --- a/Yattee/Views/Components/DataContextSwitcherMenu.swift +++ b/Yattee/Views/Components/DataContextSwitcherMenu.swift @@ -414,6 +414,11 @@ struct DataContextSwitcherSidebarRow: View { .truncationMode(.tail) } } + // The sidebar bottom bar hosts the menu's label in a UIKit button that + // keeps its first rendering: switching accounts moved the checkmark + // but the pill kept naming the old context. Recreating the menu when + // the name changes is the part SwiftUI won't do on its own here. + .id(contextTitle) .accessibilityLabel(Text(String(localized: "accounts.switcher.title"))) .accessibilityValue(Text(contextTitle)) }