From a02261561cd71fbf1bfaadc4577df4f963099bee Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 13 Sep 2023 15:03:54 +0100 Subject: [PATCH] Add comment --- src/room/InCallView.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index 24724fa3..0bf5bca7 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -566,6 +566,11 @@ function useParticipantTiles( // We carry over old tiles from the previous focus for some time after a focus switch // so that the video tiles don't all disappear and reappear. + // This is set to true when the state transitions to Switching Focus and remains + // true for a short time after it changes (ie. connState is only switching focus for + // the time it takes us to reconnect to the conference). + // If there are still members that haven't reconnected after that time, they'll just + // appear to disconnect and will reappear once they reconnect. const [isSwitchingFocus, setIsSwitchingFocus] = useState(false); useEffect(() => { @@ -596,7 +601,7 @@ function useParticipantTiles( return newItems; } else { - previousTiles.current = items; - return items; -} + previousTiles.current = items; + return items; + } }