Let the accounts screen own the switcher instead of the settings list

The main settings list carried both an Accounts row and a switcher row
beside it — two account controls at the top level, one of them opening
the screen the other belonged on. The switcher row moves to the top of
the accounts screen as a Current Account section, where the selection
it names sits directly above the checkmarked row it corresponds to.

The subscriptions-settings row and the macOS sidebar footer keep
theirs: those are contextual surfaces, not the settings list.
This commit is contained in:
Arkadiusz Fal
2026-09-12 23:58:32 +02:00
parent b08185652e
commit b8921387dd
3 changed files with 21 additions and 4 deletions

View File

@@ -461,6 +461,17 @@
}
}
},
"accounts.switcher.section" : {
"comment" : "Header of the accounts screen section holding the account switcher",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Current Account"
}
}
}
},
"accounts.switcher.title" : {
"comment" : "Label of the control that switches the selected account",
"localizations" : {

View File

@@ -123,6 +123,16 @@ struct AccountsListView: View {
emptyState
} else {
Form {
// The switcher lives here rather than beside the Accounts row
// in Settings: which account is current is this screen's
// subject, and the row below names the same account the
// checkmarked row further down is marked as.
Section {
DataContextSwitcherSettingsRow()
} header: {
Text(String(localized: "accounts.switcher.section"))
}
ForEach(groups, id: \.instance.id) { group in
instanceSection(group.instance, accounts: group.accounts)
}

View File

@@ -152,8 +152,6 @@ struct SettingsView: View {
}
.accessibilityIdentifier("settings.row.accounts")
DataContextSwitcherSettingsRow()
NavigationLink {
TVSidebarDetailContainer(systemImage: "icloud", title: String(localized: "settings.icloud.title")) { iCloudSettingsView() }
} label: {
@@ -269,8 +267,6 @@ struct SettingsView: View {
}
}
.accessibilityIdentifier("settings.row.accounts")
DataContextSwitcherSettingsRow()
}
Section {