diff --git a/Sources/Secretive/Controllers/JustUpdatedChecker.swift b/Sources/Secretive/Controllers/JustUpdatedChecker.swift index 4c86f68..4e8ea72 100644 --- a/Sources/Secretive/Controllers/JustUpdatedChecker.swift +++ b/Sources/Secretive/Controllers/JustUpdatedChecker.swift @@ -2,13 +2,13 @@ import Foundation import Combine import AppKit -protocol JustUpdatedCheckerProtocol: ObservableObject { +protocol JustUpdatedCheckerProtocol: Observable { var justUpdated: Bool { get } } -class JustUpdatedChecker: ObservableObject, JustUpdatedCheckerProtocol { +@Observable class JustUpdatedChecker: JustUpdatedCheckerProtocol { - @Published var justUpdated: Bool = false + var justUpdated: Bool = false init() { check() diff --git a/Sources/Secretive/Preview Content/PreviewStore.swift b/Sources/Secretive/Preview Content/PreviewStore.swift index c3b02a3..8318505 100644 --- a/Sources/Secretive/Preview Content/PreviewStore.swift +++ b/Sources/Secretive/Preview Content/PreviewStore.swift @@ -20,7 +20,7 @@ extension Preview { extension Preview { - final class Store: SecretStore, ObservableObject { + @Observable final class Store: SecretStore { let isAvailable = true let id = UUID() diff --git a/Sources/Secretive/Views/CreateSecretView.swift b/Sources/Secretive/Views/CreateSecretView.swift index 3dcc20d..9bddcd2 100644 --- a/Sources/Secretive/Views/CreateSecretView.swift +++ b/Sources/Secretive/Views/CreateSecretView.swift @@ -112,10 +112,10 @@ extension ThumbnailPickerView { } -@MainActor class SystemBackground: ObservableObject { +@MainActor @Observable class SystemBackground { static let shared = SystemBackground() - @Published var image: NSImage? + var image: NSImage? private init() { if let mainScreen = NSScreen.main, let imageURL = NSWorkspace.shared.desktopImageURL(for: mainScreen) {