mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Remove numerous superfluous MainActor annotations.
This commit is contained in:
@@ -67,7 +67,7 @@ import Core
|
||||
return self.classDescription as! NSScriptClassDescription
|
||||
}
|
||||
|
||||
@MainActor func deleteElement(_ element:ScriptingObject) {
|
||||
func deleteElement(_ element:ScriptingObject) {
|
||||
// TODO: fix this
|
||||
// if let scriptableFolder = element as? ScriptableFolder {
|
||||
// BatchUpdate.shared.perform {
|
||||
|
||||
@@ -111,7 +111,7 @@ import Articles
|
||||
return article.status.boolStatus(forKey:.read)
|
||||
}
|
||||
set {
|
||||
Task { @MainActor in
|
||||
Task {
|
||||
markArticles([self.article], statusKey: .read, flag: newValue)
|
||||
}
|
||||
}
|
||||
@@ -123,7 +123,7 @@ import Articles
|
||||
return article.status.boolStatus(forKey:.starred)
|
||||
}
|
||||
set {
|
||||
Task { @MainActor in
|
||||
Task {
|
||||
markArticles([self.article], statusKey: .starred, flag: newValue)
|
||||
}
|
||||
}
|
||||
@@ -146,7 +146,7 @@ import Articles
|
||||
}
|
||||
|
||||
@objc(feed)
|
||||
@MainActor var feed: ScriptableFeed? {
|
||||
var feed: ScriptableFeed? {
|
||||
guard let parentFeed = self.article.feed,
|
||||
let account = parentFeed.account
|
||||
else { return nil }
|
||||
|
||||
@@ -52,7 +52,7 @@ import Core
|
||||
return self.classDescription as! NSScriptClassDescription
|
||||
}
|
||||
|
||||
@MainActor func deleteElement(_ element:ScriptingObject) {
|
||||
func deleteElement(_ element:ScriptingObject) {
|
||||
// TODO: fix this
|
||||
// if let scriptableFeed = element as? ScriptableFeed {
|
||||
// BatchUpdate.shared.perform {
|
||||
@@ -68,7 +68,7 @@ import Core
|
||||
or
|
||||
tell account X to make new folder at end with properties {name:"new folder name"}
|
||||
*/
|
||||
@MainActor class func handleCreateElement(command:NSCreateCommand) -> Any? {
|
||||
class func handleCreateElement(command:NSCreateCommand) -> Any? {
|
||||
guard command.isCreateCommand(forClass:"fold") else { return nil }
|
||||
let name = command.property(forKey:"name") as? String ?? ""
|
||||
|
||||
@@ -82,7 +82,7 @@ import Core
|
||||
|
||||
command.suspendExecution()
|
||||
|
||||
Task { @MainActor in
|
||||
Task {
|
||||
do {
|
||||
let folder = try await account.addFolder(name)
|
||||
let scriptableAccount = ScriptableAccount(account)
|
||||
|
||||
Reference in New Issue
Block a user