* MM-30164 fix safe area insets
* Fix unit test setup mock for react-native-device-info
* Add insets for edit profile screen
* Fix about screen
* Fix theme screen
* Lock phone screen to portrait
* fix unit tests
* Fix autocomplete layout
(cherry picked from commit dcaaaee44c)
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
23 lines
787 B
JavaScript
23 lines
787 B
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {connect} from 'react-redux';
|
|
|
|
import {getTheme} from '@mm-redux/selectors/entities/preferences';
|
|
import {isTimezoneEnabled} from '@mm-redux/selectors/entities/timezone';
|
|
import {getAllowedThemes} from '@selectors/theme';
|
|
import {isThemeSwitchingEnabled} from '@utils/theme';
|
|
import DisplaySettings from './display_settings';
|
|
|
|
function mapStateToProps(state) {
|
|
const enableTimezone = isTimezoneEnabled(state);
|
|
const enableTheme = isThemeSwitchingEnabled(state) && getAllowedThemes(state).length > 1;
|
|
|
|
return {
|
|
enableTheme,
|
|
enableTimezone,
|
|
theme: getTheme(state),
|
|
};
|
|
}
|
|
|
|
export default connect(mapStateToProps)(DisplaySettings);
|