mirror of
https://github.com/netzbegruenung/jitsi-meet-electron.git
synced 2024-05-04 09:43:42 +02:00
Fix show AoT window default value
This commit is contained in:
parent
2794692cbf
commit
b72ea5a123
|
@ -8,7 +8,7 @@ import { connect } from 'react-redux';
|
|||
import { push } from 'react-router-redux';
|
||||
|
||||
import config from '../../config';
|
||||
import { setEmail, setName } from '../../settings';
|
||||
import { getSetting, setEmail, setName } from '../../settings';
|
||||
|
||||
import { conferenceEnded, conferenceJoined } from '../actions';
|
||||
import { LoadingIndicator, Wrapper } from '../styled';
|
||||
|
@ -407,7 +407,8 @@ class Conference extends Component<Props, State> {
|
|||
*/
|
||||
function _mapStateToProps(state: Object) {
|
||||
return {
|
||||
_alwaysOnTopWindowEnabled: state.settings.alwaysOnTopWindowEnabled,
|
||||
_alwaysOnTopWindowEnabled:
|
||||
getSetting(state, 'alwaysOnTopWindowEnabled', true),
|
||||
_avatarURL: state.settings.avatarURL,
|
||||
_email: state.settings.email,
|
||||
_name: state.settings.name,
|
||||
|
|
20
app/features/settings/functions.js
Normal file
20
app/features/settings/functions.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
// @flow
|
||||
|
||||
/**
|
||||
* Get's the value for the given setting, providing a default value.
|
||||
*
|
||||
* @param {Object} state - The redux state.
|
||||
* @param {string} setting - The name for the desired setting.
|
||||
* @param {*} defaultValue - The default value, in case the setting is
|
||||
* undefined.
|
||||
* @returns {*} The setting value.
|
||||
*/
|
||||
export function getSetting(state: Object, setting: string, defaultValue: any) {
|
||||
const value = state.settings[setting];
|
||||
|
||||
if (typeof value === 'undefined') {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
export * from './actions';
|
||||
export * from './actionTypes';
|
||||
export * from './components';
|
||||
export * from './functions';
|
||||
export * from './styled';
|
||||
|
||||
export { default as middleware } from './middleware';
|
||||
|
|
Loading…
Reference in a new issue