From 372c2cb0f9c567e57068b91668df11b6a8123c07 Mon Sep 17 00:00:00 2001 From: Robert Pintilii Date: Wed, 24 Aug 2022 11:26:09 +0300 Subject: [PATCH] fix(participant) Avoid unnecessary unpin calls (#12060) --- react/features/filmstrip/subscriber.web.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/react/features/filmstrip/subscriber.web.js b/react/features/filmstrip/subscriber.web.js index ad51d7ed9..591ed0566 100644 --- a/react/features/filmstrip/subscriber.web.js +++ b/react/features/filmstrip/subscriber.web.js @@ -72,11 +72,16 @@ StateListenerRegistry.register( }, /* listener */ ({ layout }, store) => { switch (layout) { - case LAYOUTS.TILE_VIEW: + case LAYOUTS.TILE_VIEW: { + const { pinnedParticipant } = store.getState()['features/base/participants']; + + if (pinnedParticipant) { + store.dispatch(pinParticipant(null)); + } store.dispatch(clearStageParticipants()); - store.dispatch(pinParticipant(null)); store.dispatch(setTileViewDimensions()); break; + } case LAYOUTS.HORIZONTAL_FILMSTRIP_VIEW: store.dispatch(setHorizontalViewDimensions()); break;