Delete no longer needed AddFeedWindowControllerType.
This commit is contained in:
parent
61235d0bcb
commit
acabaf8f94
|
@ -141,7 +141,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
|||
|
||||
func showAddFeedSheetOnWindow(_ window: NSWindow, urlString: String?, name: String?, account: Account?, folder: Folder?) {
|
||||
addFeedController = AddFeedController(hostWindow: window)
|
||||
addFeedController?.showAddFeedSheet(.webFeed, urlString, name, account, folder)
|
||||
addFeedController?.showAddFeedSheet(urlString, name, account, folder)
|
||||
}
|
||||
|
||||
// MARK: - NSApplicationDelegate
|
||||
|
|
|
@ -33,20 +33,16 @@ class AddFeedController: AddFeedWindowControllerDelegate {
|
|||
self.hostWindow = hostWindow
|
||||
}
|
||||
|
||||
func showAddFeedSheet(_ type: AddFeedWindowControllerType, _ urlString: String? = nil, _ name: String? = nil, _ account: Account? = nil, _ folder: Folder? = nil) {
|
||||
func showAddFeedSheet(_ urlString: String? = nil, _ name: String? = nil, _ account: Account? = nil, _ folder: Folder? = nil) {
|
||||
let folderTreeControllerDelegate = FolderTreeControllerDelegate()
|
||||
let folderTreeController = TreeController(delegate: folderTreeControllerDelegate)
|
||||
|
||||
switch type {
|
||||
case .webFeed:
|
||||
addFeedWindowController = AddWebFeedWindowController(urlString: urlString ?? urlStringFromPasteboard,
|
||||
addFeedWindowController = AddWebFeedWindowController(urlString: urlString ?? urlStringFromPasteboard,
|
||||
name: name,
|
||||
account: account,
|
||||
folder: folder,
|
||||
folderTreeController: folderTreeController,
|
||||
delegate: self)
|
||||
}
|
||||
|
||||
addFeedWindowController!.runSheetOnWindow(hostWindow)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// AddFeedWIndowController.swift
|
||||
// AddFeedWindowController.swift
|
||||
// NetNewsWire
|
||||
//
|
||||
// Created by Maurice Parker on 4/21/20.
|
||||
|
@ -9,21 +9,15 @@
|
|||
import Foundation
|
||||
import Account
|
||||
|
||||
enum AddFeedWindowControllerType {
|
||||
case webFeed
|
||||
}
|
||||
|
||||
protocol AddFeedWindowControllerDelegate: AnyObject {
|
||||
|
||||
// userEnteredURL will have already been validated and normalized.
|
||||
func addFeedWindowController(_: AddFeedWindowController, userEnteredURL: URL, userEnteredTitle: String?, container: Container)
|
||||
func addFeedWindowControllerUserDidCancel(_: AddFeedWindowController)
|
||||
|
||||
}
|
||||
|
||||
protocol AddFeedWindowController {
|
||||
|
||||
var window: NSWindow? { get }
|
||||
func runSheetOnWindow(_ hostWindow: NSWindow)
|
||||
|
||||
}
|
|
@ -221,7 +221,7 @@
|
|||
519B8D332143397200FA689C /* SharingServiceDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 519B8D322143397200FA689C /* SharingServiceDelegate.swift */; };
|
||||
519CA8E525841DB700EB079A /* CrashReporter in Frameworks */ = {isa = PBXBuildFile; productRef = 519CA8E425841DB700EB079A /* CrashReporter */; };
|
||||
519E743D22C663F900A78E47 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 519E743422C663F900A78E47 /* SceneDelegate.swift */; };
|
||||
51A052CE244FB9D7006C2024 /* AddFeedWIndowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A052CD244FB9D6006C2024 /* AddFeedWIndowController.swift */; };
|
||||
51A052CE244FB9D7006C2024 /* AddFeedWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A052CD244FB9D6006C2024 /* AddFeedWindowController.swift */; };
|
||||
51A16999235E10D700EB091F /* LocalAccountViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A1698F235E10D600EB091F /* LocalAccountViewController.swift */; };
|
||||
51A1699A235E10D700EB091F /* Settings.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 51A16990235E10D600EB091F /* Settings.storyboard */; };
|
||||
51A1699B235E10D700EB091F /* AccountInspectorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A16991235E10D600EB091F /* AccountInspectorViewController.swift */; };
|
||||
|
@ -913,7 +913,7 @@
|
|||
5195C1DB2720BD3000888867 /* MasterFeedRowIdentifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterFeedRowIdentifier.swift; sourceTree = "<group>"; };
|
||||
519B8D322143397200FA689C /* SharingServiceDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharingServiceDelegate.swift; sourceTree = "<group>"; };
|
||||
519E743422C663F900A78E47 /* SceneDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
|
||||
51A052CD244FB9D6006C2024 /* AddFeedWIndowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AddFeedWIndowController.swift; path = AddFeed/AddFeedWIndowController.swift; sourceTree = "<group>"; };
|
||||
51A052CD244FB9D6006C2024 /* AddFeedWindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AddFeedWindowController.swift; path = AddFeed/AddFeedWindowController.swift; sourceTree = "<group>"; };
|
||||
51A1698F235E10D600EB091F /* LocalAccountViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocalAccountViewController.swift; sourceTree = "<group>"; };
|
||||
51A16990235E10D600EB091F /* Settings.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Settings.storyboard; sourceTree = "<group>"; };
|
||||
51A16991235E10D600EB091F /* AccountInspectorViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountInspectorViewController.swift; sourceTree = "<group>"; };
|
||||
|
@ -1908,7 +1908,7 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
849A97511ED9EAC0007D329B /* AddFeedController.swift */,
|
||||
51A052CD244FB9D6006C2024 /* AddFeedWIndowController.swift */,
|
||||
51A052CD244FB9D6006C2024 /* AddFeedWindowController.swift */,
|
||||
848363002262A3BC00DA1D35 /* AddWebFeedSheet.xib */,
|
||||
849A97521ED9EAC0007D329B /* AddWebFeedWindowController.swift */,
|
||||
51EC114B2149FE3300B296E3 /* FolderTreeMenu.swift */,
|
||||
|
@ -3419,7 +3419,7 @@
|
|||
849A976D1ED9EBC8007D329B /* TimelineTableView.swift in Sources */,
|
||||
84D52E951FE588BB00D14F5B /* DetailStatusBarView.swift in Sources */,
|
||||
D5E4CC64202C1AC1009B4FFC /* MainWindowController+Scriptability.swift in Sources */,
|
||||
51A052CE244FB9D7006C2024 /* AddFeedWIndowController.swift in Sources */,
|
||||
51A052CE244FB9D7006C2024 /* AddFeedWindowController.swift in Sources */,
|
||||
84C9FC7922629E1200D921D6 /* PreferencesWindowController.swift in Sources */,
|
||||
84411E711FE5FBFA004B527F /* SmallIconProvider.swift in Sources */,
|
||||
51FA73A42332BE110090D516 /* ArticleExtractor.swift in Sources */,
|
||||
|
|
Loading…
Reference in New Issue