mattermost-mobile/app/scenes/account_notifications/index.js
Chris Duarte 5b11aea0f5 RN-68: Make save and delete preferences optimistic (#478)
Make account notifications optimistic
Make close DM/GM optimistic
Make favorite channel optimistic
2017-04-18 18:18:30 -03:00

33 lines
1 KiB
JavaScript

// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import {bindActionCreators} from 'redux';
import {goBack} from 'app/actions/navigation';
import {handleUpdateUserNotifyProps} from 'app/actions/views/account_notifications';
import {getTheme} from 'app/selectors/preferences';
import {getCurrentUser} from 'mattermost-redux/selectors/entities/users';
import navigationSceneConnect from '../navigationSceneConnect';
import AccountNotifications from './account_notifications';
function mapStateToProps(state) {
return {
config: state.entities.general.config,
myPreferences: state.entities.preferences.myPreferences,
currentUser: getCurrentUser(state),
theme: getTheme(state)
};
}
function mapDispatchToProps(dispatch) {
return {
actions: bindActionCreators({
goBack,
handleUpdateUserNotifyProps
}, dispatch)
};
}
export default navigationSceneConnect(mapStateToProps, mapDispatchToProps)(AccountNotifications);