fix(participant) Avoid unnecessary unpin calls (#12060)

This commit is contained in:
Robert Pintilii 2022-08-24 11:26:09 +03:00 committed by GitHub
parent 5b41d68d39
commit 372c2cb0f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -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;