diff --git a/iOS/SceneCoordinator.swift b/iOS/SceneCoordinator.swift
index e4ac6208e..9723f0d17 100644
--- a/iOS/SceneCoordinator.swift
+++ b/iOS/SceneCoordinator.swift
@@ -787,9 +787,11 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
func showSettings() {
let settingsNavController = UIStoryboard.settings.instantiateInitialViewController() as! UINavigationController
+ let settingsViewController = settingsNavController.topViewController as! SettingsViewController
settingsNavController.modalPresentationStyle = .formSheet
settingsNavController.preferredContentSize = SettingsViewController.preferredContentSizeForFormSheetDisplay
- masterFeedViewController.present(settingsNavController, animated: true)
+ settingsViewController.presentingParentController = rootSplitViewController
+ rootSplitViewController.present(settingsNavController, animated: true)
}
func showFeedInspector() {
diff --git a/iOS/Settings/Settings.storyboard b/iOS/Settings/Settings.storyboard
index 90bf18be9..a9c662f46 100644
--- a/iOS/Settings/Settings.storyboard
+++ b/iOS/Settings/Settings.storyboard
@@ -495,7 +495,7 @@
-
+
@@ -610,7 +610,7 @@
-
+
diff --git a/iOS/Settings/SettingsViewController.swift b/iOS/Settings/SettingsViewController.swift
index 0a703d174..bcf83e988 100644
--- a/iOS/Settings/SettingsViewController.swift
+++ b/iOS/Settings/SettingsViewController.swift
@@ -12,6 +12,7 @@ import SafariServices
class SettingsViewController: UITableViewController {
+ private let appNewsURLString = "https://nnw.ranchero.com/feed.json"
static let preferredContentSizeForFormSheetDisplay = CGSize(width: 460.0, height: 400.0)
@IBOutlet weak var refreshIntervalLabel: UILabel!
@@ -77,6 +78,12 @@ class SettingsViewController: UITableViewController {
return defaultNumberOfRows - 1
}
return defaultNumberOfRows
+ case 3:
+ let defaultNumberOfRows = super.tableView(tableView, numberOfRowsInSection: section)
+ if AccountManager.shared.anyAccountHasFeedWithURL(appNewsURLString) {
+ return defaultNumberOfRows - 1
+ }
+ return defaultNumberOfRows
default:
return super.tableView(tableView, numberOfRowsInSection: section)
}
@@ -243,24 +250,17 @@ private extension SettingsViewController {
}
func addFeed() {
-
- let appNewsURLString = "https://nnw.ranchero.com/feed.json"
- if AccountManager.shared.anyAccountHasFeedWithURL(appNewsURLString) {
- presentError(title: "Subscribe", message: "You are already subscribed to the NetNewsWire news feed.")
- return
- }
-
self.dismiss(animated: true)
let addNavViewController = UIStoryboard.add.instantiateInitialViewController() as! UINavigationController
let addViewController = addNavViewController.topViewController as! AddContainerViewController
addNavViewController.modalPresentationStyle = .formSheet
addNavViewController.preferredContentSize = AddContainerViewController.preferredContentSizeForFormSheetDisplay
+ addViewController.initialControllerType = .feed
addViewController.initialFeed = appNewsURLString
addViewController.initialFeedName = "NetNewsWire News"
presentingParentController?.present(addNavViewController, animated: true)
-
}
func importOPML() {