fix(participant) Avoid unnecessary unpin calls (#12060)
This commit is contained in:
parent
5b41d68d39
commit
372c2cb0f9
|
@ -72,11 +72,16 @@ StateListenerRegistry.register(
|
||||||
},
|
},
|
||||||
/* listener */ ({ layout }, store) => {
|
/* listener */ ({ layout }, store) => {
|
||||||
switch (layout) {
|
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(clearStageParticipants());
|
||||||
store.dispatch(pinParticipant(null));
|
|
||||||
store.dispatch(setTileViewDimensions());
|
store.dispatch(setTileViewDimensions());
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case LAYOUTS.HORIZONTAL_FILMSTRIP_VIEW:
|
case LAYOUTS.HORIZONTAL_FILMSTRIP_VIEW:
|
||||||
store.dispatch(setHorizontalViewDimensions());
|
store.dispatch(setHorizontalViewDimensions());
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue