A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
fix(app): write the first voice session restore snapshot on startup (#1974)
Hampusa0d4a33fd4bb
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.tsindex 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;