diff --git a/Mac/AppDelegate.swift b/Mac/AppDelegate.swift
index 4de0e011d..e8bc956b3 100644
--- a/Mac/AppDelegate.swift
+++ b/Mac/AppDelegate.swift
@@ -135,10 +135,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
addFolderWindowController!.runSheetOnWindow(window)
}
- func showAddFeedSheetOnWindow(_ window: NSWindow, urlString: String?, name: String?, account: Account?, folder: Folder?) {
-
+ func showAddWebFeedSheetOnWindow(_ window: NSWindow, urlString: String?, name: String?, account: Account?, folder: Folder?) {
addFeedController = AddFeedController(hostWindow: window)
- addFeedController?.showAddFeedSheet(urlString, name, account, folder)
+ addFeedController?.showAddFeedSheet(.webFeed, urlString, name, account, folder)
}
// MARK: - NSApplicationDelegate
@@ -401,7 +400,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
if item.action == #selector(sortByNewestArticleOnTop(_:)) || item.action == #selector(sortByOldestArticleOnTop(_:)) {
return mainWindowController?.isOpen ?? false
}
- if item.action == #selector(showAddFeedWindow(_:)) || item.action == #selector(showAddFolderWindow(_:)) {
+ if item.action == #selector(showAddWebFeedWindow(_:)) || item.action == #selector(showAddFolderWindow(_:)) {
return !isDisplayingSheet && !AccountManager.shared.activeAccounts.isEmpty
}
#if !MAC_APP_STORE
@@ -424,14 +423,14 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
}
// MARK: Add Feed
- func addFeed(_ urlString: String?, name: String? = nil, account: Account? = nil, folder: Folder? = nil) {
+ func addWebFeed(_ urlString: String?, name: String? = nil, account: Account? = nil, folder: Folder? = nil) {
createAndShowMainWindowIfNecessary()
if mainWindowController!.isDisplayingSheet {
return
}
- showAddFeedSheetOnWindow(mainWindowController!.window!, urlString: urlString, name: name, account: account, folder: folder)
+ showAddWebFeedSheetOnWindow(mainWindowController!.window!, urlString: urlString, name: name, account: account, folder: folder)
}
// MARK: - Dock Badge
@@ -462,8 +461,14 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
AccountManager.shared.refreshAll(errorHandler: ErrorHandler.present)
}
- @IBAction func showAddFeedWindow(_ sender: Any?) {
- addFeed(nil)
+ @IBAction func showAddWebFeedWindow(_ sender: Any?) {
+ addWebFeed(nil)
+ }
+
+ @IBAction func showAddTwitterFeedWindow(_ sender: Any?) {
+ createAndShowMainWindowIfNecessary()
+ addFeedController = AddFeedController(hostWindow: mainWindowController!.window!)
+ addFeedController?.showAddFeedSheet(.twitterFeed)
}
@IBAction func showAddFolderWindow(_ sender: Any?) {
@@ -536,7 +541,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
if AccountManager.shared.anyAccountHasFeedWithURL(appNewsURLString) {
return
}
- addFeed(appNewsURLString, name: "NetNewsWire News")
+ addWebFeed(appNewsURLString, name: "NetNewsWire News")
}
@IBAction func openWebsite(_ sender: Any?) {
diff --git a/Mac/Base.lproj/AddTwitterFeedSheet.xib b/Mac/Base.lproj/AddTwitterFeedSheet.xib
new file mode 100644
index 000000000..c4c8cb500
--- /dev/null
+++ b/Mac/Base.lproj/AddTwitterFeedSheet.xib
@@ -0,0 +1,192 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Mac/Base.lproj/AddWebFeedSheet.xib b/Mac/Base.lproj/AddWebFeedSheet.xib
index e8e8660a5..812519436 100644
--- a/Mac/Base.lproj/AddWebFeedSheet.xib
+++ b/Mac/Base.lproj/AddWebFeedSheet.xib
@@ -16,7 +16,7 @@
-
+
diff --git a/Mac/Base.lproj/Main.storyboard b/Mac/Base.lproj/Main.storyboard
index ce6a63050..5b2a00ebe 100644
--- a/Mac/Base.lproj/Main.storyboard
+++ b/Mac/Base.lproj/Main.storyboard
@@ -1,7 +1,7 @@
-
+
-
+
@@ -70,7 +70,13 @@
+