mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fix several warnings.
This commit is contained in:
@@ -10,7 +10,7 @@ import AppKit
|
||||
import Articles
|
||||
import RSCore
|
||||
|
||||
extension Article: PasteboardWriterOwner {
|
||||
extension Article: @retroactive PasteboardWriterOwner {
|
||||
public var pasteboardWriter: NSPasteboardWriting {
|
||||
return ArticlePasteboardWriter(article: self)
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ struct AddAccountsView: View {
|
||||
.padding(.top, 8)
|
||||
|
||||
HStack {
|
||||
ForEach(0..<chunkedWebAccounts().count, content: { chunk in
|
||||
ForEach(0..<chunkedWebAccounts().count, id: \.self, content: { chunk in
|
||||
VStack {
|
||||
Picker(selection: $selectedAccount, label: Text(""), content: {
|
||||
ForEach(chunkedWebAccounts()[chunk], id: \.self, content: { account in
|
||||
|
||||
@@ -10,6 +10,7 @@ import AppKit
|
||||
import RSCore
|
||||
import RSWeb
|
||||
import UserNotifications
|
||||
import UniformTypeIdentifiers
|
||||
|
||||
final class GeneralPreferencesViewController: NSViewController {
|
||||
|
||||
@@ -125,7 +126,7 @@ private extension GeneralPreferencesViewController {
|
||||
let item = NSMenuItem(title: name, action: nil, keyEquivalent: "")
|
||||
item.representedObject = browser.bundleIdentifier
|
||||
|
||||
let icon = browser.icon ?? NSWorkspace.shared.icon(forFileType: kUTTypeApplicationBundle as String)
|
||||
let icon = browser.icon ?? NSWorkspace.shared.icon(for: UTType.applicationBundle)
|
||||
icon.size = NSSize(width: 16.0, height: 16.0)
|
||||
item.image = browser.icon
|
||||
menu.addItem(item)
|
||||
|
||||
@@ -10,7 +10,7 @@ import AppKit
|
||||
|
||||
//let keypadEnter: unichar = 3
|
||||
|
||||
@objc public protocol KeyboardDelegate: class {
|
||||
@objc public protocol KeyboardDelegate: AnyObject {
|
||||
|
||||
// Return true if handled.
|
||||
func keydown(_: NSEvent, in view: NSView) -> Bool
|
||||
|
||||
@@ -15,7 +15,7 @@ import Foundation
|
||||
/// When it’s canceled, it should do its best to stop
|
||||
/// doing whatever it’s doing. However, it should not
|
||||
/// leave data in an inconsistent state.
|
||||
public protocol MainThreadOperation: class {
|
||||
public protocol MainThreadOperation: AnyObject {
|
||||
|
||||
// These three properties are set by MainThreadOperationQueue. Don’t set them.
|
||||
var isCanceled: Bool { get set } // Check this at appropriate times in case the operation has been canceled.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public protocol MainThreadOperationDelegate: class {
|
||||
public protocol MainThreadOperationDelegate: AnyObject {
|
||||
func operationDidComplete(_ operation: MainThreadOperation)
|
||||
func cancelOperation(_ operation: MainThreadOperation)
|
||||
func make(_ childOperation: MainThreadOperation, dependOn parentOperation: MainThreadOperation)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public protocol UndoableCommand: class {
|
||||
public protocol UndoableCommand: AnyObject {
|
||||
|
||||
var undoActionName: String { get }
|
||||
var redoActionName: String { get }
|
||||
@@ -39,7 +39,7 @@ extension UndoableCommand {
|
||||
|
||||
// Useful for view controllers.
|
||||
|
||||
public protocol UndoableCommandRunner: class {
|
||||
public protocol UndoableCommandRunner: AnyObject {
|
||||
|
||||
var undoableCommands: [UndoableCommand] { get set }
|
||||
var undoManager: UndoManager? { get }
|
||||
|
||||
Reference in New Issue
Block a user