From 0bb3eaaf67b301e917b0fe63be25579bcc6ca2f2 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 18 Aug 2016 13:46:47 +0100 Subject: [PATCH] Use constants --- .../NotificationStateContextMenu.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/views/context_menus/NotificationStateContextMenu.js b/src/components/views/context_menus/NotificationStateContextMenu.js index e78483adc4..243275db27 100644 --- a/src/components/views/context_menus/NotificationStateContextMenu.js +++ b/src/components/views/context_menus/NotificationStateContextMenu.js @@ -77,40 +77,40 @@ module.exports = React.createClass({ }, _onClickAlertMe: function() { - this._save('all_messages_loud'); + this._save(RoomNotifs.ALL_MESSAGES_LOUD); }, _onClickAllNotifs: function() { - this._save('all_messages'); + this._save(RoomNotifs.ALL_MESSAGES); }, _onClickMentions: function() { - this._save('mentions_only'); + this._save(RoomNotifs.MENTIONS_ONLY); }, _onClickMute: function() { - this._save('mute'); + this._save(RoomNotifs.MUTE); }, render: function() { var alertMeClasses = classNames({ 'mx_NotificationStateContextMenu_field': true, - 'mx_NotificationStateContextMenu_fieldSet': this.state.roomNotifState == 'all_messages_loud', + 'mx_NotificationStateContextMenu_fieldSet': this.state.roomNotifState == RoomNotifs.ALL_MESSAGES_LOUD, }); var allNotifsClasses = classNames({ 'mx_NotificationStateContextMenu_field': true, - 'mx_NotificationStateContextMenu_fieldSet': this.state.roomNotifState == 'all_messages', + 'mx_NotificationStateContextMenu_fieldSet': this.state.roomNotifState == RoomNotifs.ALL_MESSAGES, }); var mentionsClasses = classNames({ 'mx_NotificationStateContextMenu_field': true, - 'mx_NotificationStateContextMenu_fieldSet': this.state.roomNotifState == 'mentions_only', + 'mx_NotificationStateContextMenu_fieldSet': this.state.roomNotifState == RoomNotifs.MENTIONS_ONLY, }); var muteNotifsClasses = classNames({ 'mx_NotificationStateContextMenu_field': true, - 'mx_NotificationStateContextMenu_fieldSet': this.state.roomNotifState == 'mute', + 'mx_NotificationStateContextMenu_fieldSet': this.state.roomNotifState == RoomNotifs.MUTE, }); return (