mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Mark many things as MainActor and deal with the fallout.
This commit is contained in:
@@ -17,12 +17,12 @@ extension Notification.Name {
|
||||
|
||||
public protocol DisplayNameProvider {
|
||||
|
||||
var nameForDisplay: String { get }
|
||||
@MainActor var nameForDisplay: String { get }
|
||||
}
|
||||
|
||||
public extension DisplayNameProvider {
|
||||
|
||||
func postDisplayNameDidChangeNotification() {
|
||||
@MainActor func postDisplayNameDidChangeNotification() {
|
||||
|
||||
NotificationCenter.default.post(name: .DisplayNameDidChange, object: self, userInfo: nil)
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public protocol MainThreadOperation: AnyObject {
|
||||
///
|
||||
/// The completionBlock is always called on the main thread.
|
||||
/// The queue will clear the completionBlock after calling it.
|
||||
var completionBlock: MainThreadOperationCompletionBlock? { get set }
|
||||
@MainActor var completionBlock: MainThreadOperationCompletionBlock? { get set }
|
||||
|
||||
/// Do the thing this operation does.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user