From 1576bcd87aa01cea4f61ac6909c57699b9e12081 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Sun, 13 Nov 2022 00:06:32 +0800 Subject: [PATCH] Display & Behaviors --- .../Appearance View/AppearanceManagementView.swift | 14 ++++++++------ iOS/Settings/Settings View/SettingsRows.swift | 9 ++++++++- iOS/Settings/Settings View/SettingsView.swift | 10 ++++------ 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/iOS/Settings/Appearance View/AppearanceManagementView.swift b/iOS/Settings/Appearance View/AppearanceManagementView.swift index 7834d436d..f700f1fa4 100644 --- a/iOS/Settings/Appearance View/AppearanceManagementView.swift +++ b/iOS/Settings/Appearance View/AppearanceManagementView.swift @@ -14,7 +14,7 @@ struct AppearanceManagementView: View { var body: some View { List { - Section("Application Appearance") { + Section("Application") { HStack { appLightButton() Spacer() @@ -25,20 +25,22 @@ struct AppearanceManagementView: View { .listRowBackground(Color.clear) } - Section("Timeline Appearance") { + Section("Timeline") { SettingsViewRows.SortOldestToNewest($appDefaults.timelineSortDirectionBool) SettingsViewRows.GroupByFeed($appDefaults.timelineGroupByFeed) SettingsViewRows.RefreshToClearReadArticles($appDefaults.refreshClearsReadArticles) } - Section("Article Appearance") { + Section("Article") { SettingsViewRows.ThemeSelection SettingsViewRows.ConfirmMarkAllAsRead($appDefaults.confirmMarkAllAsRead) - SettingsViewRows.OpenLinksInNetNewsWire($appDefaults.useSystemBrowser) - SettingsViewRows.EnableFullScreenArticles($appDefaults.articleFullscreenEnabled) + SettingsViewRows.OpenLinksInNetNewsWire(Binding( + get: { !appDefaults.useSystemBrowser }, + set: { appDefaults.useSystemBrowser = !$0 } + )) } } - .navigationTitle(Text("Appearance")) + .navigationTitle(Text("Display & Behaviors")) .tint(Color(uiColor: AppAssets.primaryAccentColor)) } diff --git a/iOS/Settings/Settings View/SettingsRows.swift b/iOS/Settings/Settings View/SettingsRows.swift index f795f7937..266b74341 100644 --- a/iOS/Settings/Settings View/SettingsRows.swift +++ b/iOS/Settings/Settings View/SettingsRows.swift @@ -213,7 +213,7 @@ struct SettingsViewRows { static var ConfigureAppearance: some View { NavigationLink(destination: AppearanceManagementView()) { Label { - Text("Appearance") + Text("Display & Behaviors") } icon: { Image("app.appearance") .resizable() @@ -258,3 +258,10 @@ struct SettingsViewRows { } } } + + +extension Binding where Value == Bool { + func negate() -> Bool { + return !(self.wrappedValue) + } +} diff --git a/iOS/Settings/Settings View/SettingsView.swift b/iOS/Settings/Settings View/SettingsView.swift index 588da7b5f..b53249b3f 100644 --- a/iOS/Settings/Settings View/SettingsView.swift +++ b/iOS/Settings/Settings View/SettingsView.swift @@ -22,22 +22,20 @@ struct SettingsView: View { List { // System Settings - Section(footer: Text("Configure access to Siri, background app refresh, mobile data, and more.")) { + Section(footer: Text("Configure NetNewsWire's access to Siri, background app refresh, mobile data, and more.")) { SettingsViewRows.OpenSystemSettings } - Section(footer: Text("Add, delete, or disable accounts and extensions.")) { + Section(footer: Text("Add, delete, enable or disable accounts and extensions.")) { SettingsViewRows.AddAccount SettingsViewRows.AddExtension } - Section(footer: Text("Configure the look and feel of NetNewsWire.")) { + Section(footer: Text("Configure the look, feel, and behavior of NetNewsWire.")) { SettingsViewRows.ConfigureAppearance SettingsViewRows.ConfigureNewArticleNotifications } - - - + Section { ForEach(0..