mattermost-mobile/app/screens/settings/theme/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

33 lines
1.1 KiB
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {getTheme} from 'mattermost-redux/selectors/entities/preferences';
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';
import {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams';
import {savePreferences} from 'mattermost-redux/actions/preferences';
import {getAllowedThemes, getCustomTheme} from 'app/selectors/theme';
import {isLandscape, isTablet} from 'app/selectors/device';
import Theme from './theme';
const mapStateToProps = (state) => ({
allowedThemes: getAllowedThemes(state),
customTheme: getCustomTheme(state),
isLandscape: isLandscape(state),
isTablet: isTablet(state),
teamId: getCurrentTeamId(state),
theme: getTheme(state),
userId: getCurrentUserId(state),
});
const mapDispatchToProps = (dispatch) => ({
actions: bindActionCreators({
savePreferences,
}, dispatch),
});
export default connect(mapStateToProps, mapDispatchToProps)(Theme);