From 152bc14fcb7c276fbf053c9f70921ad7f8180167 Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Thu, 4 May 2017 02:30:22 -0700 Subject: PLT-6379 revert to original value when canceled (#6319) --- webapp/components/channel_notifications_modal.jsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'webapp/components') diff --git a/webapp/components/channel_notifications_modal.jsx b/webapp/components/channel_notifications_modal.jsx index 7af563e7c..d1fd81057 100644 --- a/webapp/components/channel_notifications_modal.jsx +++ b/webapp/components/channel_notifications_modal.jsx @@ -194,6 +194,9 @@ export default class ChannelNotificationsModal extends React.Component { const handleUpdateSection = function updateSection(e) { this.updateSection(''); + this.setState({ + notifyLevel: this.props.channelMember.notify_props.desktop + }); e.preventDefault(); }.bind(this); @@ -322,6 +325,9 @@ export default class ChannelNotificationsModal extends React.Component { const handleUpdateSection = function handleUpdateSection(e) { this.updateSection(''); + this.setState({ + unreadLevel: this.props.channelMember.notify_props.mark_unread + }); e.preventDefault(); }.bind(this); @@ -360,6 +366,9 @@ export default class ChannelNotificationsModal extends React.Component { const handleUpdateSection = function handleUpdateSection(e) { this.updateSection('markUnreadLevel'); + this.setState({ + unreadLevel: this.props.channelMember.notify_props.mark_unread + }); e.preventDefault(); }.bind(this); @@ -524,6 +533,9 @@ export default class ChannelNotificationsModal extends React.Component { const handleUpdateSection = function updateSection(e) { this.updateSection(''); + this.setState({ + pushLevel: this.props.channelMember.notify_props.push || 'default' + }); e.preventDefault(); }.bind(this); -- cgit v1.2.3-1-g7c22