Fix disabled updater

This commit is contained in:
Max Goedjen 2025-08-17 12:24:39 -05:00
parent deace4b378
commit 288c8f8eaa
No known key found for this signature in database
2 changed files with 11 additions and 11 deletions

View File

@ -44,15 +44,15 @@ class AppDelegate: NSObject, NSApplicationDelegate {
} }
try? publicKeyFileStoreController.generatePublicKeys(for: storeList.allSecrets, clear: true) try? publicKeyFileStoreController.generatePublicKeys(for: storeList.allSecrets, clear: true)
notifier.prompt() notifier.prompt()
// _ = withObservationTracking { _ = withObservationTracking {
// updater.update updater.update
// } onChange: { [updater, notifier] in } onChange: { [updater, notifier] in
// notifier.notify(update: updater.update!) { release in Task {
// Task { await notifier.notify(update: updater.update!) { release in
// await updater.ignore(release: release) await updater.ignore(release: release)
// } }
// } }
// } }
} }
} }

View File

@ -79,7 +79,7 @@ final class Notifier: Sendable {
try? await notificationCenter.add(request) try? await notificationCenter.add(request)
} }
func notify(update: Release, ignore: (@Sendable (Release) -> Void)?) async { func notify(update: Release, ignore: (@Sendable (Release) async -> Void)?) async {
await notificationDelegate.state.prepareForNotification(release: update, ignoreAction: ignore) await notificationDelegate.state.prepareForNotification(release: update, ignoreAction: ignore)
let notificationCenter = UNUserNotificationCenter.current() let notificationCenter = UNUserNotificationCenter.current()
let notificationContent = UNMutableNotificationContent() let notificationContent = UNMutableNotificationContent()
@ -134,7 +134,7 @@ final class NotificationDelegate: NSObject, UNUserNotificationCenterDelegate, Se
fileprivate actor State { fileprivate actor State {
typealias PersistAction = (@Sendable (AnySecret, AnySecretStore, TimeInterval?) async -> Void) typealias PersistAction = (@Sendable (AnySecret, AnySecretStore, TimeInterval?) async -> Void)
typealias IgnoreAction = (@Sendable (Release) -> Void) typealias IgnoreAction = (@Sendable (Release) async -> Void)
fileprivate var release: Release? fileprivate var release: Release?
fileprivate var ignoreAction: IgnoreAction? fileprivate var ignoreAction: IgnoreAction?
fileprivate var persistAction: PersistAction? fileprivate var persistAction: PersistAction?