mirror of
https://github.com/yattee/yattee.git
synced 2026-11-03 10:27:19 +00:00
Rebuild the sidebar switcher menu when the context name changes
This commit is contained in:
@@ -414,6 +414,11 @@ struct DataContextSwitcherSidebarRow: View {
|
|||||||
.truncationMode(.tail)
|
.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")))
|
.accessibilityLabel(Text(String(localized: "accounts.switcher.title")))
|
||||||
.accessibilityValue(Text(contextTitle))
|
.accessibilityValue(Text(contextTitle))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user