From 111fbb2495e88d69bec29971da8ddf086ac3f3b6 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Wed, 23 Sep 2015 16:58:50 -0400 Subject: Changed notification preference submission to only be updated when options have actually changed --- web/react/components/channel_notifications.jsx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'web/react') diff --git a/web/react/components/channel_notifications.jsx b/web/react/components/channel_notifications.jsx index c49e76333..eaa1c8255 100644 --- a/web/react/components/channel_notifications.jsx +++ b/web/react/components/channel_notifications.jsx @@ -81,6 +81,11 @@ export default class ChannelNotifications extends React.Component { var channelId = this.state.channelId; var notifyLevel = this.state.notifyLevel; + if (ChannelStore.getMember(channelId).notify_level === notifyLevel) { + this.updateSection(''); + return; + } + var data = {}; data.channel_id = channelId; data.user_id = UserStore.getCurrentId(); @@ -244,6 +249,11 @@ export default class ChannelNotifications extends React.Component { const channelId = this.state.channelId; const markUnreadLevel = this.state.markUnreadLevel; + if (ChannelStore.getMember(channelId).mark_unread_level === markUnreadLevel) { + this.updateSection(''); + return; + } + const data = { channel_id: channelId, user_id: UserStore.getCurrentId(), -- cgit v1.2.3-1-g7c22