Fixes build errors on iOS

This commit is contained in:
Stuart Breckenridge
2023-05-27 17:14:27 +08:00
parent 31e783a5f7
commit 59ec1c58ae
3 changed files with 13 additions and 13 deletions

View File

@@ -21,14 +21,14 @@ struct ArticleThemeManagerView: View {
Form {
Section(header: Text("label.text.default-themes", comment: "Default Themes"), footer: Text("label.text.default-themes-explainer", comment: "These themes cannot be deleted.")) {
articleThemeRow(try! themeManager.articleThemeWithThemeName("Default"))
ForEach(0..<installedFirstPartyThemes.count, id: \.self) { i in
articleThemeRow(installedFirstPartyThemes[i])
ForEach(0..<themeManager.themesByDeveloper().builtIn.count, id: \.self) { i in
articleThemeRow(themeManager.themesByDeveloper().builtIn[i])
}
}
Section(header: Text("label.text.third-party-themes", comment: "Third Party Themes")) {
ForEach(0..<installedThirdPartyThemes.count, id: \.self) { i in
articleThemeRow(installedThirdPartyThemes[i])
ForEach(0..<themeManager.themesByDeveloper().other.count, id: \.self) { i in
articleThemeRow(themeManager.themesByDeveloper().other[i])
}
}

View File

@@ -20,8 +20,8 @@ struct DisplayAndBehaviorsView: View {
}
Section(header: Text("label.text.timeline", comment: "Timeline")) {
SettingsViewRows.sortOldestToNewest($appDefaults.timelineSortDirectionBool)
SettingsViewRows.groupByFeed($appDefaults.timelineGroupByFeed)
SettingsRow.sortOldestToNewest($appDefaults.timelineSortDirectionBool)
SettingsRow.groupByFeed($appDefaults.timelineGroupByFeed)
SettingsRow.confirmMarkAllAsRead($appDefaults.confirmMarkAllAsRead)
SettingsRow.markAsReadOnScroll($appDefaults.markArticlesAsReadOnScroll)
SettingsRow.refreshToClearReadArticles($appDefaults.refreshClearsReadArticles)
@@ -29,7 +29,7 @@ struct DisplayAndBehaviorsView: View {
}
Section(header: Text("label.text.articles", comment: "Articles")) {
SettingsViewRows.themeSelection
SettingsRow.themeSelection
SettingsRow.openLinksInNetNewsWire(Binding<Bool>(
get: { !appDefaults.useSystemBrowser },
set: { appDefaults.useSystemBrowser = !$0 }

View File

@@ -26,15 +26,15 @@ struct SettingsView: View {
// Device Permissions
Section(header: Text("label.text.device-permissions", comment: "Device Permissions"),
footer: Text("label.text.device-permissions-explainer", comment: "Configure NetNewsWire's access to Siri, background app refresh, mobile data, and more.")) {
SettingsViewRows.openSystemSettings
SettingsRow.openSystemSettings
}
// Account/Extensions/OPML Management
Section(header: Text("label.text.accounts-and-extensions", comment: "Settings: Accounts & Extensions section header."),
footer: Text("label.text.account-and-extensions-explainer", comment: "Add, delete, enable, or disable accounts and extensions.")) {
SettingsViewRows.addAccount
SettingsViewRows.manageExtensions
SettingsViewRows.importOPML(showImportActionSheet: $viewModel.showImportActionSheet)
SettingsRow.addAccount
SettingsRow.manageExtensions
SettingsRow.importOPML(showImportActionSheet: $viewModel.showImportActionSheet)
.confirmationDialog(Text("actionsheet.title.choose-opml-destination", comment: "Choose an account to receive the imported feeds and folders"),
isPresented: $viewModel.showImportActionSheet,
titleVisibility: .visible) {
@@ -46,7 +46,7 @@ struct SettingsView: View {
}
}
SettingsViewRows.exportOPML(showExportActionSheet: $viewModel.showExportActionSheet)
SettingsRow.exportOPML(showExportActionSheet: $viewModel.showExportActionSheet)
.confirmationDialog(Text("actionsheet.title.choose-opml-export-account", comment: "Choose an account with the subscriptions to export"),
isPresented: $viewModel.showExportActionSheet,
titleVisibility: .visible) {
@@ -68,7 +68,7 @@ struct SettingsView: View {
// Appearance
Section(header: Text("label.text.appearance", comment: "Settings: Appearance section header."),
footer: Text("label.text.appearance-explainer", comment: "Manage the look, feel, and behavior of NetNewsWire.")) {
SettingsViewRows.configureAppearance($isConfigureAppearanceShown)
SettingsRow.configureAppearance($isConfigureAppearanceShown)
if viewModel.notificationPermissions == .authorized {
SettingsRow.configureNewArticleNotifications
}