From a0d4a33fd4bbe61a3234d53dd73ab52c74f26a33 Mon Sep 17 00:00:00 2001 From: Hampus Date: Mon, 24 Aug 2026 12:56:04 +0200 Subject: [PATCH] fix(app): write the first voice session restore snapshot on startup (#1974) --- .../engine/media_engine_facade/VoiceSessionRestoreSync.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fluxer_app/src/features/voice/engine/media_engine_facade/VoiceSessionRestoreSync.ts b/fluxer_app/src/features/voice/engine/media_engine_facade/VoiceSessionRestoreSync.ts index f08646790..be504fd8d 100644 --- a/fluxer_app/src/features/voice/engine/media_engine_facade/VoiceSessionRestoreSync.ts +++ b/fluxer_app/src/features/voice/engine/media_engine_facade/VoiceSessionRestoreSync.ts @@ -62,10 +62,10 @@ export function saveCurrentVoiceSessionRestoreSnapshot(): void { } export function createVoiceSessionRestoreSync(): VoiceSessionRestoreSyncHandle { - let previousState = readVoiceSessionRestoreSyncState(); + let previousState: VoiceSessionRestoreSyncState | null = null; const syncVoiceSessionRestore = () => { const currentState = readVoiceSessionRestoreSyncState(); - if (areVoiceSessionRestoreSyncStatesEqual(previousState, currentState)) { + if (previousState !== null && areVoiceSessionRestoreSyncStatesEqual(previousState, currentState)) { return; } previousState = currentState;