From b8921387ddae9b3687e8668f887480e191655fae Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Sat, 12 Sep 2026 23:58:32 +0200 Subject: [PATCH] Let the accounts screen own the switcher instead of the settings list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- Yattee/Localizable.xcstrings | 11 +++++++++++ Yattee/Views/Settings/AccountsListView.swift | 10 ++++++++++ Yattee/Views/Settings/SettingsView.swift | 4 ---- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Yattee/Localizable.xcstrings b/Yattee/Localizable.xcstrings index a9948393..01a806b8 100644 --- a/Yattee/Localizable.xcstrings +++ b/Yattee/Localizable.xcstrings @@ -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" : { diff --git a/Yattee/Views/Settings/AccountsListView.swift b/Yattee/Views/Settings/AccountsListView.swift index 3f30b6f1..05b30a60 100644 --- a/Yattee/Views/Settings/AccountsListView.swift +++ b/Yattee/Views/Settings/AccountsListView.swift @@ -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) } diff --git a/Yattee/Views/Settings/SettingsView.swift b/Yattee/Views/Settings/SettingsView.swift index 4007278b..b370dafa 100644 --- a/Yattee/Views/Settings/SettingsView.swift +++ b/Yattee/Views/Settings/SettingsView.swift @@ -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 {