From 8856916ccc45074d0c04da650eaac733d173e34e Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 17 Jun 2025 03:43:20 +0200 Subject: [PATCH] Fix NotificationCenter async sequence usage Remove incorrect .values accessor - NotificationCenter.Notifications is already an AsyncSequence --- VibeTunnel/Core/Services/ServerManager.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/VibeTunnel/Core/Services/ServerManager.swift b/VibeTunnel/Core/Services/ServerManager.swift index 4487d086..eb64f37c 100644 --- a/VibeTunnel/Core/Services/ServerManager.swift +++ b/VibeTunnel/Core/Services/ServerManager.swift @@ -74,7 +74,8 @@ class ServerManager { private func setupObservers() { // Watch for server mode changes when the value actually changes Task { @MainActor in - for await _ in NotificationCenter.default.notifications(named: UserDefaults.didChangeNotification).values { + let notifications = NotificationCenter.default.notifications(named: UserDefaults.didChangeNotification) + for await _ in notifications { await handleServerModeChange() } }