mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Merge branch 'main' into super-cut
This commit is contained in:
@@ -66,7 +66,9 @@ struct CreditsNetNewsWireView: View, LoadableAboutData {
|
||||
.onTapGesture {
|
||||
guard let url = appCredit.url else { return }
|
||||
if let _ = URL(string: url) {
|
||||
Browser.open(url, inBackground: false)
|
||||
Task { @MainActor in
|
||||
Browser.open(url, inBackground: false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import RSParser
|
||||
// Else,
|
||||
// display error sheet.
|
||||
|
||||
class AddFeedController: AddFeedWindowControllerDelegate {
|
||||
@MainActor final class AddFeedController: AddFeedWindowControllerDelegate {
|
||||
|
||||
private let hostWindow: NSWindow
|
||||
private var addFeedWindowController: AddFeedWindowController?
|
||||
|
||||
@@ -14,7 +14,7 @@ enum AddFeedWindowControllerType {
|
||||
case redditFeed
|
||||
}
|
||||
|
||||
protocol AddFeedWindowControllerDelegate: AnyObject {
|
||||
@MainActor protocol AddFeedWindowControllerDelegate: AnyObject {
|
||||
|
||||
// userEnteredURL will have already been validated and normalized.
|
||||
func addFeedWindowController(_: AddFeedWindowController, userEnteredURL: URL, userEnteredTitle: String?, container: Container)
|
||||
@@ -22,7 +22,7 @@ protocol AddFeedWindowControllerDelegate: AnyObject {
|
||||
|
||||
}
|
||||
|
||||
protocol AddFeedWindowController {
|
||||
@MainActor protocol AddFeedWindowController {
|
||||
|
||||
var window: NSWindow? { get }
|
||||
func runSheetOnWindow(_ hostWindow: NSWindow)
|
||||
|
||||
@@ -12,7 +12,7 @@ import RSTree
|
||||
import Articles
|
||||
import Account
|
||||
|
||||
class AddWebFeedWindowController : NSWindowController, AddFeedWindowController {
|
||||
@MainActor final class AddWebFeedWindowController : NSWindowController, AddFeedWindowController {
|
||||
|
||||
@IBOutlet var urlTextField: NSTextField!
|
||||
@IBOutlet var nameTextField: NSTextField!
|
||||
|
||||
@@ -11,7 +11,7 @@ import RSCore
|
||||
import RSTree
|
||||
import Account
|
||||
|
||||
class FolderTreeMenu {
|
||||
@MainActor final class FolderTreeMenu {
|
||||
|
||||
static func createFolderPopupMenu(with rootNode: Node, restrictToSpecialAccounts: Bool = false) -> NSMenu {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import AppKit
|
||||
import Articles
|
||||
import Account
|
||||
|
||||
class AddFolderWindowController : NSWindowController {
|
||||
@MainActor final class AddFolderWindowController : NSWindowController {
|
||||
|
||||
@IBOutlet var folderNameTextField: NSTextField!
|
||||
@IBOutlet var accountPopupButton: NSPopUpButton!
|
||||
|
||||
@@ -12,7 +12,7 @@ import RSTree
|
||||
import Articles
|
||||
import Account
|
||||
|
||||
class AddRedditFeedWindowController : NSWindowController, AddFeedWindowController {
|
||||
@MainActor final class AddRedditFeedWindowController : NSWindowController, AddFeedWindowController {
|
||||
|
||||
@IBOutlet weak var typePopupButton: NSPopUpButton!
|
||||
@IBOutlet weak var typeDescriptionLabel: NSTextField!
|
||||
|
||||
@@ -15,7 +15,7 @@ enum ArticleExtractorButtonState {
|
||||
case off
|
||||
}
|
||||
|
||||
class ArticleExtractorButton: NSButton {
|
||||
@MainActor final class ArticleExtractorButton: NSButton {
|
||||
|
||||
public var rightClickAction: Selector?
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import Foundation
|
||||
import WebKit
|
||||
import Articles
|
||||
|
||||
class DetailIconSchemeHandler: NSObject, WKURLSchemeHandler {
|
||||
final class DetailIconSchemeHandler: NSObject, WKURLSchemeHandler {
|
||||
|
||||
var currentArticle: Article?
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import AppKit
|
||||
import Articles
|
||||
|
||||
final class DetailStatusBarView: NSView {
|
||||
@MainActor final class DetailStatusBarView: NSView {
|
||||
|
||||
@IBOutlet var urlLabel: NSTextField!
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ enum DetailState: Equatable {
|
||||
case extracted(Article, ExtractedArticle, CGFloat?)
|
||||
}
|
||||
|
||||
final class DetailViewController: NSViewController, WKUIDelegate {
|
||||
@MainActor final class DetailViewController: NSViewController, WKUIDelegate {
|
||||
|
||||
@IBOutlet var containerView: DetailContainerView!
|
||||
@IBOutlet var statusBarView: DetailStatusBarView!
|
||||
|
||||
@@ -10,7 +10,7 @@ import AppKit
|
||||
import WebKit
|
||||
import RSCore
|
||||
|
||||
final class DetailWebView: WKWebView {
|
||||
@MainActor final class DetailWebView: WKWebView {
|
||||
|
||||
weak var keyboardDelegate: KeyboardDelegate?
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ protocol DetailWebViewControllerDelegate: AnyObject {
|
||||
func mouseDidExit(_: DetailWebViewController)
|
||||
}
|
||||
|
||||
final class DetailWebViewController: NSViewController {
|
||||
@MainActor final class DetailWebViewController: NSViewController {
|
||||
|
||||
weak var delegate: DetailWebViewControllerDelegate?
|
||||
var webView: DetailWebView!
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
class MainWindow: NSWindow {
|
||||
@MainActor class MainWindow: NSWindow {
|
||||
|
||||
override func sendEvent(_ event: NSEvent) {
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ enum TimelineSourceMode {
|
||||
case regular, search
|
||||
}
|
||||
|
||||
class MainWindowController : NSWindowController, NSUserInterfaceValidations {
|
||||
@MainActor final class MainWindowController : NSWindowController, NSUserInterfaceValidations {
|
||||
|
||||
@IBOutlet weak var articleThemePopUpButton: NSPopUpButton?
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import AppKit
|
||||
import Account
|
||||
|
||||
struct NNW3ImportController {
|
||||
@MainActor struct NNW3ImportController {
|
||||
|
||||
/// Import NNW3 subscriptions if they exist.
|
||||
/// Return true if Subscriptions.plist was found and subscriptions were imported.
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import AppKit
|
||||
import Account
|
||||
|
||||
final class NNW3OpenPanelAccessoryViewController: NSViewController {
|
||||
@MainActor final class NNW3OpenPanelAccessoryViewController: NSViewController {
|
||||
|
||||
@IBOutlet weak var accountPopUpButton: NSPopUpButton!
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import AppKit
|
||||
import Account
|
||||
|
||||
class ExportOPMLWindowController: NSWindowController {
|
||||
@MainActor final class ExportOPMLWindowController: NSWindowController {
|
||||
|
||||
@IBOutlet weak var accountPopUpButton: NSPopUpButton!
|
||||
private weak var hostWindow: NSWindow?
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import AppKit
|
||||
import Account
|
||||
|
||||
class ImportOPMLWindowController: NSWindowController {
|
||||
@MainActor final class ImportOPMLWindowController: NSWindowController {
|
||||
|
||||
@IBOutlet weak var accountPopUpButton: NSPopUpButton!
|
||||
private weak var hostWindow: NSWindow?
|
||||
|
||||
@@ -11,7 +11,7 @@ import RSCore
|
||||
import Account
|
||||
import RSTree
|
||||
|
||||
class SidebarCell : NSTableCellView {
|
||||
@MainActor final class SidebarCell : NSTableCellView {
|
||||
|
||||
var iconImage: IconImage? {
|
||||
didSet {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import AppKit
|
||||
|
||||
struct SidebarCellAppearance: Equatable {
|
||||
@MainActor struct SidebarCellAppearance: Equatable {
|
||||
|
||||
let imageSize: CGSize
|
||||
let imageMarginRight: CGFloat = 4.0
|
||||
|
||||
@@ -11,7 +11,7 @@ import RSCore
|
||||
|
||||
// image - title - unreadCount
|
||||
|
||||
struct SidebarCellLayout {
|
||||
@MainActor struct SidebarCellLayout {
|
||||
|
||||
let faviconRect: CGRect
|
||||
let titleRect: CGRect
|
||||
|
||||
@@ -13,7 +13,7 @@ protocol RenameWindowControllerDelegate {
|
||||
func renameWindowController(_ windowController: RenameWindowController, didRenameObject: Any, withNewName: String)
|
||||
}
|
||||
|
||||
final class RenameWindowController: NSWindowController {
|
||||
@MainActor final class RenameWindowController: NSWindowController {
|
||||
|
||||
@IBOutlet var renamePrompt: NSTextField!
|
||||
@IBOutlet var newTitleTextField: NSTextField!
|
||||
|
||||
@@ -10,7 +10,7 @@ import AppKit
|
||||
import RSTree
|
||||
import Account
|
||||
|
||||
enum SidebarDeleteItemsAlert {
|
||||
@MainActor enum SidebarDeleteItemsAlert {
|
||||
|
||||
/// Builds a delete confirmation dialog for the supplied nodes
|
||||
static func build(_ nodes: [Node]) -> NSAlert {
|
||||
|
||||
@@ -492,7 +492,7 @@ private extension SidebarOutlineDataSource {
|
||||
return true
|
||||
}
|
||||
|
||||
func acceptSingleNonLocalFeedDrop(_ outlineView: NSOutlineView, _ draggedFeed: PasteboardWebFeed, _ parentNode: Node, _ index: Int) -> Bool {
|
||||
@MainActor func acceptSingleNonLocalFeedDrop(_ outlineView: NSOutlineView, _ draggedFeed: PasteboardWebFeed, _ parentNode: Node, _ index: Int) -> Bool {
|
||||
guard nodeIsDropTarget(parentNode), index == NSOutlineViewDropOnItemIndex else {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import AppKit
|
||||
import RSCore
|
||||
import RSTree
|
||||
|
||||
class SidebarOutlineView : NSOutlineView {
|
||||
@MainActor class SidebarOutlineView : NSOutlineView {
|
||||
|
||||
@IBOutlet var keyboardDelegate: KeyboardDelegate!
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import Articles
|
||||
import RSWeb
|
||||
import Account
|
||||
|
||||
final class SidebarStatusBarView: NSView {
|
||||
@MainActor final class SidebarStatusBarView: NSView {
|
||||
|
||||
@IBOutlet var progressIndicator: NSProgressIndicator!
|
||||
@IBOutlet var progressLabel: NSTextField!
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import AppKit
|
||||
|
||||
final class TimelineContainerView: NSView {
|
||||
@MainActor final class TimelineContainerView: NSView {
|
||||
|
||||
private var contentViewConstraints: [NSLayoutConstraint]?
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ protocol TimelineContainerViewControllerDelegate: AnyObject {
|
||||
|
||||
}
|
||||
|
||||
final class TimelineContainerViewController: NSViewController {
|
||||
@MainActor final class TimelineContainerViewController: NSViewController {
|
||||
|
||||
@IBOutlet weak var viewOptionsPopUpButton: NSPopUpButton!
|
||||
@IBOutlet weak var newestToOldestMenuItem: NSMenuItem!
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import AppKit
|
||||
|
||||
class TimelineTableRowView : NSTableRowView {
|
||||
@MainActor final class TimelineTableRowView : NSTableRowView {
|
||||
|
||||
private var separator: NSView?
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import AppKit
|
||||
import RSCore
|
||||
|
||||
class TimelineTableView: NSTableView {
|
||||
@MainActor final class TimelineTableView: NSTableView {
|
||||
|
||||
weak var keyboardDelegate: KeyboardDelegate?
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import RSCore
|
||||
|
||||
extension URLPasteboardWriter {
|
||||
@MainActor extension URLPasteboardWriter {
|
||||
|
||||
/// Copy URL strings, alerting the user the first time the array of URL strings contains `nil`.
|
||||
/// - Parameters:
|
||||
|
||||
Reference in New Issue
Block a user