diff --git a/Aware/Shared/UserDefaults+AsyncSequence.swift b/Aware/Shared/UserDefaults+AsyncSequence.swift index 109ca99..c75ad1e 100644 --- a/Aware/Shared/UserDefaults+AsyncSequence.swift +++ b/Aware/Shared/UserDefaults+AsyncSequence.swift @@ -48,7 +48,8 @@ extension UserDefaults { ) -> AsyncStream { .init(bufferingPolicy: .bufferingNewest(1)) { continuation in let observer = Observer(store: self, keyPath: keyPath) { value in - logger.debug("Yielding UserDefaults new \"\(keyPath, privacy: .public)\" value") + logger.debug( + "Yielding UserDefaults \"\(keyPath, privacy: .public)\" value: \(String(describing: value))") continuation.yield(value) } diff --git a/Aware/macOS/ActivityMonitor.swift b/Aware/macOS/ActivityMonitor.swift index d5f7949..2797239 100644 --- a/Aware/macOS/ActivityMonitor.swift +++ b/Aware/macOS/ActivityMonitor.swift @@ -69,7 +69,7 @@ struct ActivityMonitor { async let userDefaultsTask: () = { @MainActor in let store = UserDefaults.standard for await value in store.updates(forKeyPath: "reset", type: Bool.self, initial: true) { - logger.log("Received UserDefaults \"reset\" change") + logger.debug("Received UserDefaults \"reset\" change") if value == true { state.restart() } diff --git a/Aware/visionOS/ActivityMonitor.swift b/Aware/visionOS/ActivityMonitor.swift index 8d3f98a..5e8264e 100644 --- a/Aware/visionOS/ActivityMonitor.swift +++ b/Aware/visionOS/ActivityMonitor.swift @@ -83,10 +83,9 @@ struct ActivityMonitor { async let userDefaultsTask: () = { @MainActor in let store = UserDefaults.standard for await value in store.updates(forKeyPath: "reset", type: Bool.self, initial: true) { - logger.log("Received UserDefaults \"reset\" change") + logger.debug("Received UserDefaults \"reset\" change") if value == true { - state.deactivate() - state.activate() + state.restart() } if value != nil { logger.debug("Cleaning up \"reset\" key")