mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-31 03:05:00 +01:00
Fix Mac build errors.
This commit is contained in:
parent
9759d7dcd5
commit
797d7ef2e0
@ -9,7 +9,7 @@
|
||||
import AppKit
|
||||
import UserNotifications
|
||||
import Articles
|
||||
import RSTree
|
||||
import Tree
|
||||
import RSWeb
|
||||
import Account
|
||||
import CoreResources
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import AppKit
|
||||
import CoreResources
|
||||
import RSTree
|
||||
import Tree
|
||||
import Articles
|
||||
import Account
|
||||
import RSParser
|
||||
|
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
import AppKit
|
||||
import RSTree
|
||||
import Tree
|
||||
import Articles
|
||||
import Account
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
import AppKit
|
||||
import RSTree
|
||||
import Tree
|
||||
import Account
|
||||
import Core
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
import Account
|
||||
import RSTree
|
||||
import Tree
|
||||
|
||||
class SidebarCell : NSTableCellView {
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
import AppKit
|
||||
import RSTree
|
||||
import Tree
|
||||
import Account
|
||||
|
||||
@MainActor struct SidebarDeleteItemsAlert {
|
||||
|
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
import AppKit
|
||||
import RSTree
|
||||
import Tree
|
||||
import Articles
|
||||
import Account
|
||||
import Core
|
||||
|
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
import AppKit
|
||||
import RSTree
|
||||
import Tree
|
||||
import AppKitExtras
|
||||
|
||||
class SidebarOutlineView : NSOutlineView {
|
||||
|
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
import AppKit
|
||||
import RSTree
|
||||
import Tree
|
||||
import Articles
|
||||
import Account
|
||||
import Core
|
||||
|
@ -7,12 +7,12 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import RSTree
|
||||
import Tree
|
||||
import Account
|
||||
import Articles
|
||||
import Core
|
||||
|
||||
final class DeleteCommand: UndoableCommand {
|
||||
@MainActor final class DeleteCommand: UndoableCommand {
|
||||
|
||||
let treeController: TreeController?
|
||||
let undoManager: UndoManager
|
||||
@ -67,7 +67,7 @@ final class DeleteCommand: UndoableCommand {
|
||||
registerRedo()
|
||||
}
|
||||
|
||||
static func canDelete(_ nodes: [Node]) -> Bool {
|
||||
@MainActor static func canDelete(_ nodes: [Node]) -> Bool {
|
||||
|
||||
// Return true if all nodes are feeds and folders.
|
||||
// Any other type: return false.
|
||||
@ -93,7 +93,7 @@ final class DeleteCommand: UndoableCommand {
|
||||
// Remember as much as we can now about the items being deleted,
|
||||
// so they can be restored to the correct place.
|
||||
|
||||
private struct SidebarItemSpecifier {
|
||||
@MainActor private struct SidebarItemSpecifier {
|
||||
|
||||
private weak var account: Account?
|
||||
private let parentFolder: Folder?
|
||||
@ -265,7 +265,7 @@ private struct DeleteActionName {
|
||||
private static let deleteFolders = NSLocalizedString("Delete Folders", comment: "command")
|
||||
private static let deleteFeedsAndFolders = NSLocalizedString("Delete Feeds and Folders", comment: "command")
|
||||
|
||||
static func name(for nodes: [Node]) -> String? {
|
||||
@MainActor static func name(for nodes: [Node]) -> String? {
|
||||
|
||||
var numberOfFeeds = 0
|
||||
var numberOfFolders = 0
|
||||
|
@ -7,18 +7,18 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import RSTree
|
||||
import Tree
|
||||
import Articles
|
||||
import Core
|
||||
|
||||
extension Array where Element == Node {
|
||||
|
||||
func sortedAlphabetically() -> [Node] {
|
||||
@MainActor func sortedAlphabetically() -> [Node] {
|
||||
|
||||
return Node.nodesSortedAlphabetically(self)
|
||||
}
|
||||
|
||||
func sortedAlphabeticallyWithFoldersAtEnd() -> [Node] {
|
||||
@MainActor func sortedAlphabeticallyWithFoldersAtEnd() -> [Node] {
|
||||
|
||||
return Node.nodesSortedAlphabeticallyWithFoldersAtEnd(self)
|
||||
}
|
||||
|
@ -7,11 +7,11 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import RSTree
|
||||
import Tree
|
||||
import Articles
|
||||
import Account
|
||||
|
||||
final class FeedTreeControllerDelegate: TreeControllerDelegate {
|
||||
@MainActor final class FeedTreeControllerDelegate: TreeControllerDelegate {
|
||||
|
||||
private var filterExceptions = Set<SidebarItemIdentifier>()
|
||||
var isReadFiltered = false
|
||||
@ -54,14 +54,14 @@ private extension FeedTreeControllerDelegate {
|
||||
return topLevelNodes
|
||||
}
|
||||
|
||||
func childNodesForSmartFeeds(_ parentNode: Node) -> [Node] {
|
||||
@MainActor func childNodesForSmartFeeds(_ parentNode: Node) -> [Node] {
|
||||
return SmartFeedsController.shared.smartFeeds.compactMap { (feed) -> Node? in
|
||||
// All Smart Feeds should remain visible despite the Hide Read Feeds setting
|
||||
return parentNode.existingOrNewChildNode(with: feed as AnyObject)
|
||||
}
|
||||
}
|
||||
|
||||
func childNodesForContainerNode(_ containerNode: Node) -> [Node]? {
|
||||
@MainActor func childNodesForContainerNode(_ containerNode: Node) -> [Node]? {
|
||||
let container = containerNode.representedObject as! Container
|
||||
|
||||
var children = [AnyObject]()
|
||||
|
@ -7,12 +7,12 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import RSTree
|
||||
import Tree
|
||||
import Articles
|
||||
import Account
|
||||
|
||||
final class FolderTreeControllerDelegate: TreeControllerDelegate {
|
||||
|
||||
@MainActor final class FolderTreeControllerDelegate: TreeControllerDelegate {
|
||||
|
||||
@MainActor func treeController(treeController: TreeController, childNodesFor node: Node) -> [Node]? {
|
||||
|
||||
return node.isRoot ? childNodesForRootNode(node) : childNodes(node)
|
||||
@ -21,15 +21,15 @@ final class FolderTreeControllerDelegate: TreeControllerDelegate {
|
||||
|
||||
private extension FolderTreeControllerDelegate {
|
||||
|
||||
@MainActor func childNodesForRootNode(_ node: Node) -> [Node]? {
|
||||
func childNodesForRootNode(_ node: Node) -> [Node]? {
|
||||
|
||||
let accountNodes: [Node] = AccountManager.shared.sortedActiveAccounts.map { account in
|
||||
let accountNode = Node(representedObject: account, parent: node)
|
||||
accountNode.canHaveChildNodes = true
|
||||
return accountNode
|
||||
}
|
||||
|
||||
return accountNodes
|
||||
|
||||
}
|
||||
|
||||
func childNodes(_ node: Node) -> [Node]? {
|
||||
@ -40,7 +40,6 @@ private extension FolderTreeControllerDelegate {
|
||||
|
||||
let folderNodes: [Node] = folders.map { createNode($0, parent: node) }
|
||||
return folderNodes.sortedAlphabetically()
|
||||
|
||||
}
|
||||
|
||||
func createNode(_ folder: Folder, parent: Node) -> Node {
|
||||
@ -48,5 +47,4 @@ private extension FolderTreeControllerDelegate {
|
||||
node.canHaveChildNodes = false
|
||||
return node
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import Foundation
|
||||
|
||||
public protocol TreeControllerDelegate: AnyObject {
|
||||
|
||||
func treeController(treeController: TreeController, childNodesFor: Node) -> [Node]?
|
||||
@MainActor func treeController(treeController: TreeController, childNodesFor: Node) -> [Node]?
|
||||
}
|
||||
|
||||
public typealias NodeVisitBlock = (_ : Node) -> Void
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
import Account
|
||||
import RSTree
|
||||
import Tree
|
||||
import RSParser
|
||||
import Core
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
import Account
|
||||
import RSTree
|
||||
import Tree
|
||||
|
||||
protocol FeedTableViewCellDelegate: AnyObject {
|
||||
func feedTableViewCellDisclosureDidToggle(_ sender: FeedTableViewCell, expanding: Bool)
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
import Account
|
||||
import RSTree
|
||||
import Tree
|
||||
import Core
|
||||
|
||||
extension SidebarViewController: UITableViewDropDelegate {
|
||||
|
@ -9,7 +9,7 @@
|
||||
import UIKit
|
||||
import Account
|
||||
import Articles
|
||||
import RSTree
|
||||
import Tree
|
||||
import SafariServices
|
||||
import Core
|
||||
|
||||
|
@ -10,7 +10,7 @@ import UIKit
|
||||
import UserNotifications
|
||||
import Account
|
||||
import Articles
|
||||
import RSTree
|
||||
import Tree
|
||||
import SafariServices
|
||||
import SwiftUI
|
||||
import Core
|
||||
|
@ -10,7 +10,7 @@ import UIKit
|
||||
import MobileCoreServices
|
||||
import Account
|
||||
import Social
|
||||
import RSTree
|
||||
import Tree
|
||||
import UniformTypeIdentifiers
|
||||
|
||||
class ShareViewController: SLComposeServiceViewController, ShareFolderPickerControllerDelegate {
|
||||
|
Loading…
x
Reference in New Issue
Block a user