* Add Channel Settings > Notification Preferences.
Fixes #15185
* Make newly added strings mmjstool compatible.
mmjstool seems to be looking for specific patterns in AST like called with
`formatMessage` and `t()` [1]. Looks like `t()` is just for that purpose.
[1]: a83581379d/mmjstool/src/i18n_extract.js (L97):L100
* Pass only required props to NotificationPreference & ChannelNotificationPreference.
* Fix style issues/nits from code review.
* Use radio button for channel notifications on android, and checkmarks on iOS.
Also changes style according to figma spec.
* Fix missing prop error.
For some reason, `npm run fix` didn't catch this. But `npm run check` did during CircleCI.
* Fix missing i18n strings by passing strings through `t()`.
mmjstool really needs to be smarter to understand these types of cases.
* Address comments from UX code review.
* Remove remnant from merge conflict.
* Fix UI in iOS landscape mode.
* Use SafeArea view for ios landscape view
* Use paddingHorizontal for SafeArea view for iOS landscape mode
26 lines
834 B
JavaScript
26 lines
834 B
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 {updateChannelNotifyProps} from '@mm-redux/actions/channels';
|
|
import {getTheme} from '@mm-redux/selectors/entities/preferences';
|
|
import {isLandscape} from 'app/selectors/device';
|
|
|
|
import ChannelNotificationPreference from './channel_notification_preference';
|
|
|
|
function mapStateToProps(state) {
|
|
const theme = getTheme(state);
|
|
return {
|
|
theme,
|
|
isLandscape: isLandscape(state),
|
|
};
|
|
}
|
|
|
|
const mapDispatchToProps = (dispatch) => ({
|
|
actions: bindActionCreators({
|
|
updateChannelNotifyProps,
|
|
}, dispatch),
|
|
});
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(ChannelNotificationPreference);
|