fix(menubar): use SupportedCurrency enum in settings picker (#435)
Some checks failed
CI / semgrep (push) Has been cancelled

The currency picker hardcoded 8 currencies while the SupportedCurrency
enum defines 18. New currencies added to the enum (like CNY in #430)
required a separate SettingsView edit to appear in the picker.
This commit is contained in:
Resham Joshi 2026-06-03 23:27:55 +02:00 committed by GitHub
parent a6601efc60
commit 14fbd4d6d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -36,8 +36,8 @@ private struct GeneralSettingsTab: View {
get: { store.currency },
set: { applyCurrency(code: $0) }
)) {
ForEach(["USD", "EUR", "GBP", "INR", "JPY", "CNY", "AUD", "CAD"], id: \.self) { code in
Text(code).tag(code)
ForEach(SupportedCurrency.allCases) { currency in
Text("\(currency.rawValue)\(currency.displayName)").tag(currency.rawValue)
}
}
Picker("Metric", selection: Binding(