fix(thumbnail) Fix pinned participant in the resizable filmstrip (#11042)
Show border on the pinned participant in the vertical filmstrip grid view
This commit is contained in:
parent
c9ea193d04
commit
06800f88bf
|
@ -2,6 +2,7 @@
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { shouldComponentUpdate } from 'react-window';
|
import { shouldComponentUpdate } from 'react-window';
|
||||||
|
|
||||||
|
import { getPinnedParticipant } from '../../../base/participants';
|
||||||
import { connect } from '../../../base/redux';
|
import { connect } from '../../../base/redux';
|
||||||
import { shouldHideSelfView } from '../../../base/settings/functions.any';
|
import { shouldHideSelfView } from '../../../base/settings/functions.any';
|
||||||
import { getCurrentLayout, LAYOUTS } from '../../../video-layout';
|
import { getCurrentLayout, LAYOUTS } from '../../../video-layout';
|
||||||
|
@ -90,6 +91,7 @@ class ThumbnailWrapper extends Component<Props> {
|
||||||
if (_participantID === 'local') {
|
if (_participantID === 'local') {
|
||||||
return _disableSelfView ? null : (
|
return _disableSelfView ? null : (
|
||||||
<Thumbnail
|
<Thumbnail
|
||||||
|
_isAnyParticipantPinned = { _isAnyParticipantPinned }
|
||||||
horizontalOffset = { _horizontalOffset }
|
horizontalOffset = { _horizontalOffset }
|
||||||
key = 'local'
|
key = 'local'
|
||||||
style = { style } />);
|
style = { style } />);
|
||||||
|
@ -116,12 +118,12 @@ class ThumbnailWrapper extends Component<Props> {
|
||||||
function _mapStateToProps(state, ownProps) {
|
function _mapStateToProps(state, ownProps) {
|
||||||
const _currentLayout = getCurrentLayout(state);
|
const _currentLayout = getCurrentLayout(state);
|
||||||
const { remoteParticipants } = state['features/filmstrip'];
|
const { remoteParticipants } = state['features/filmstrip'];
|
||||||
const { remote, local } = state['features/base/participants'];
|
|
||||||
const remoteParticipantsLength = remoteParticipants.length;
|
const remoteParticipantsLength = remoteParticipants.length;
|
||||||
const { testing = {} } = state['features/base/config'];
|
const { testing = {} } = state['features/base/config'];
|
||||||
const disableSelfView = shouldHideSelfView(state);
|
const disableSelfView = shouldHideSelfView(state);
|
||||||
const enableThumbnailReordering = testing.enableThumbnailReordering ?? true;
|
const enableThumbnailReordering = testing.enableThumbnailReordering ?? true;
|
||||||
const _verticalViewGrid = showGridInVerticalView(state);
|
const _verticalViewGrid = showGridInVerticalView(state);
|
||||||
|
const _isAnyParticipantPinned = Boolean(getPinnedParticipant(state));
|
||||||
|
|
||||||
if (_currentLayout === LAYOUTS.TILE_VIEW || _verticalViewGrid) {
|
if (_currentLayout === LAYOUTS.TILE_VIEW || _verticalViewGrid) {
|
||||||
const { columnIndex, rowIndex } = ownProps;
|
const { columnIndex, rowIndex } = ownProps;
|
||||||
|
@ -156,13 +158,15 @@ function _mapStateToProps(state, ownProps) {
|
||||||
return {
|
return {
|
||||||
_disableSelfView: disableSelfView,
|
_disableSelfView: disableSelfView,
|
||||||
_participantID: 'local',
|
_participantID: 'local',
|
||||||
_horizontalOffset: horizontalOffset
|
_horizontalOffset: horizontalOffset,
|
||||||
|
_isAnyParticipantPinned: _verticalViewGrid && _isAnyParticipantPinned
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_participantID: remoteParticipants[remoteIndex],
|
_participantID: remoteParticipants[remoteIndex],
|
||||||
_horizontalOffset: horizontalOffset
|
_horizontalOffset: horizontalOffset,
|
||||||
|
_isAnyParticipantPinned: _verticalViewGrid && _isAnyParticipantPinned
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,8 +176,6 @@ function _mapStateToProps(state, ownProps) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
const _isAnyParticipantPinned = Boolean([ ...remote ].find(([ , value ]) => value?.pinned) || local?.pinned);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_participantID: remoteParticipants[index],
|
_participantID: remoteParticipants[index],
|
||||||
_isAnyParticipantPinned
|
_isAnyParticipantPinned
|
||||||
|
|
Loading…
Reference in New Issue