fix(ShareDesktopButton): getParticipants reference

This commit is contained in:
Hristo Terezov 2021-07-21 15:29:09 -05:00
parent 2d04f3852c
commit e91df47d1b
1 changed files with 1 additions and 4 deletions

View File

@ -3,7 +3,6 @@
import { translate } from '../../../base/i18n';
import { IconShareDesktop } from '../../../base/icons';
import JitsiMeetJS from '../../../base/lib-jitsi-meet/_';
import { getParticipants } from '../../../base/participants';
import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { getLocalVideoTrack } from '../../../base/tracks';
@ -123,9 +122,7 @@ const mapStateToProps = state => {
if (enableFeaturesBasedOnToken) {
// we enable desktop sharing if any participant already have this
// feature enabled
desktopSharingEnabled = getParticipants(state)
.find(({ features = {} }) =>
String(features['screen-sharing']) === 'true') !== undefined;
desktopSharingEnabled = state['features/base/participant'].haveParticipantWithScreenSharingFeature;
desktopSharingDisabledTooltipKey = 'dialog.shareYourScreenDisabled';
}