mattermost-mobile/app/screens/settings/display_settings/index.js
Elias Nahum 7b75868101 Various fixes (#3078)
* MM-17588 Remove navigation component from stack

* MM-175986 Fix Clock Display Settings on iOS

* Fix markdown and team icon currentServerUrl

* Fix closing permalink logs out the user

* Fix file attachment document ref

* Fix applyTheme when changing a theme in the app

* Feedback review

* remove / when fetching the image on the markdown table on relative paths
2019-08-08 22:39:27 +08:00

36 lines
1.1 KiB
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {bindActionCreators} from 'redux';
import {connect} from 'react-redux';
import {getTheme} from 'mattermost-redux/selectors/entities/preferences';
import {isTimezoneEnabled} from 'mattermost-redux/selectors/entities/timezone';
import {applyTheme, goToScreen} from 'app/actions/navigation';
import {getAllowedThemes} from 'app/selectors/theme';
import {isThemeSwitchingEnabled} from 'app/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),
};
}
function mapDispatchToProps(dispatch) {
return {
actions: bindActionCreators({
goToScreen,
applyTheme,
}, dispatch),
};
}
export default connect(mapStateToProps, mapDispatchToProps)(DisplaySettings);