fix(rn,screen-sharing) don't disable button when in audio-only mode
Just like the web.
This commit is contained in:
parent
fd62ca6c67
commit
de7c9bd001
|
@ -140,6 +140,7 @@
|
||||||
"@babel/preset-react": "7.16.0",
|
"@babel/preset-react": "7.16.0",
|
||||||
"@babel/runtime": "7.16.0",
|
"@babel/runtime": "7.16.0",
|
||||||
"@jitsi/eslint-config": "4.0.0",
|
"@jitsi/eslint-config": "4.0.0",
|
||||||
|
"@types/react-native": "0.67.6",
|
||||||
"babel-loader": "8.2.3",
|
"babel-loader": "8.2.3",
|
||||||
"babel-plugin-optional-require": "0.3.1",
|
"babel-plugin-optional-require": "0.3.1",
|
||||||
"circular-dependency-plugin": "5.2.0",
|
"circular-dependency-plugin": "5.2.0",
|
||||||
|
@ -5499,6 +5500,15 @@
|
||||||
"csstype": "^3.0.2"
|
"csstype": "^3.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/react-native": {
|
||||||
|
"version": "0.67.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.67.6.tgz",
|
||||||
|
"integrity": "sha512-NM6atxrefIXMLE/PyQ1bIQjQ/lWLdls3uVxItzKvNUUVZlGqgn/uGN4MarM9quSf90uSqJYPIAeAgTtBTUjhgg==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@types/react": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/react-transition-group": {
|
"node_modules/@types/react-transition-group": {
|
||||||
"version": "4.4.4",
|
"version": "4.4.4",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.4.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.4.tgz",
|
||||||
|
@ -24106,6 +24116,15 @@
|
||||||
"csstype": "^3.0.2"
|
"csstype": "^3.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@types/react-native": {
|
||||||
|
"version": "0.67.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.67.6.tgz",
|
||||||
|
"integrity": "sha512-NM6atxrefIXMLE/PyQ1bIQjQ/lWLdls3uVxItzKvNUUVZlGqgn/uGN4MarM9quSf90uSqJYPIAeAgTtBTUjhgg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/react": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@types/react-transition-group": {
|
"@types/react-transition-group": {
|
||||||
"version": "4.4.4",
|
"version": "4.4.4",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.4.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.4.tgz",
|
||||||
|
|
|
@ -145,6 +145,7 @@
|
||||||
"@babel/preset-react": "7.16.0",
|
"@babel/preset-react": "7.16.0",
|
||||||
"@babel/runtime": "7.16.0",
|
"@babel/runtime": "7.16.0",
|
||||||
"@jitsi/eslint-config": "4.0.0",
|
"@jitsi/eslint-config": "4.0.0",
|
||||||
|
"@types/react-native": "0.67.6",
|
||||||
"babel-loader": "8.2.3",
|
"babel-loader": "8.2.3",
|
||||||
"babel-plugin-optional-require": "0.3.1",
|
"babel-plugin-optional-require": "0.3.1",
|
||||||
"circular-dependency-plugin": "5.2.0",
|
"circular-dependency-plugin": "5.2.0",
|
||||||
|
|
|
@ -25,7 +25,7 @@ import HelpButton from '../HelpButton';
|
||||||
import AudioOnlyButton from './AudioOnlyButton';
|
import AudioOnlyButton from './AudioOnlyButton';
|
||||||
import LinkToSalesforceButton from './LinkToSalesforceButton';
|
import LinkToSalesforceButton from './LinkToSalesforceButton';
|
||||||
import RaiseHandButton from './RaiseHandButton';
|
import RaiseHandButton from './RaiseHandButton';
|
||||||
import ScreenSharingButton from './ScreenSharingButton.js';
|
import ScreenSharingButton from './ScreenSharingButton';
|
||||||
import ToggleCameraButton from './ToggleCameraButton';
|
import ToggleCameraButton from './ToggleCameraButton';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
// @flow
|
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Platform } from 'react-native';
|
import { Platform } from 'react-native';
|
||||||
|
|
||||||
import { connect } from '../../../base/redux';
|
import { connect } from '../../../base/redux';
|
||||||
import { isDesktopShareButtonDisabled } from '../../functions';
|
import { isDesktopShareButtonDisabled } from '../../functions.native';
|
||||||
|
|
||||||
import ScreenSharingAndroidButton from './ScreenSharingAndroidButton.js';
|
import ScreenSharingAndroidButton from './ScreenSharingAndroidButton.js';
|
||||||
import ScreenSharingIosButton from './ScreenSharingIosButton.js';
|
import ScreenSharingIosButton from './ScreenSharingIosButton.js';
|
||||||
|
@ -24,17 +22,12 @@ const ScreenSharingButton = props => (
|
||||||
* Maps (parts of) the redux state to the associated props for the
|
* Maps (parts of) the redux state to the associated props for the
|
||||||
* {@code ScreenSharingButton} component.
|
* {@code ScreenSharingButton} component.
|
||||||
*
|
*
|
||||||
* @param {Object} state - The Redux state.
|
* @param state - The Redux state.
|
||||||
* @private
|
* @private
|
||||||
* @returns {{
|
|
||||||
* _disabled: boolean,
|
|
||||||
* }}
|
|
||||||
*/
|
*/
|
||||||
function _mapStateToProps(state): Object {
|
function _mapStateToProps(state: object): object {
|
||||||
const disabled = state['features/base/audio-only'].enabled || isDesktopShareButtonDisabled(state);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_disabled: disabled
|
_disabled: isDesktopShareButtonDisabled(state)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue