From 900b1c6ab1e51a130e51436211b6e7583fc3b850 Mon Sep 17 00:00:00 2001 From: Nourrisse Florian Date: Wed, 22 Apr 2026 18:56:17 +0200 Subject: [PATCH] fix(ios): correct swapped deviceOnline/deviceOffline bool assignments In webSocketMessageMonitoring, the WS message handler was doing the opposite of what the names imply: - MsgType.deviceOnline set deviceIsOnline = false - MsgType.deviceOffline set deviceIsOnline = true Obvious typo in the upstream code. Once the StackChan successfully opened its avatar WS to the server, the server pushed a deviceOnline notification to the App and the App mislabelled the status as offline. --- app/StackChan/AppState.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/StackChan/AppState.swift b/app/StackChan/AppState.swift index 974990b..ef1cb24 100644 --- a/app/StackChan/AppState.swift +++ b/app/StackChan/AppState.swift @@ -251,9 +251,9 @@ class AppState: ObservableObject { if let msgType = result.0 { switch msgType { case MsgType.deviceOnline: - self.deviceIsOnline = false - case MsgType.deviceOffline: self.deviceIsOnline = true + case MsgType.deviceOffline: + self.deviceIsOnline = false default: break }