summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-09-23 16:58:50 -0400
committerhmhealey <harrisonmhealey@gmail.com>2015-09-30 09:59:59 -0400
commit111fbb2495e88d69bec29971da8ddf086ac3f3b6 (patch)
tree66df9b417021f3f1ad1cf357cd8a2856f68e0b65
parent284a660a4784d43c18f02d3741acef9604455f30 (diff)
downloadchat-111fbb2495e88d69bec29971da8ddf086ac3f3b6.tar.gz
chat-111fbb2495e88d69bec29971da8ddf086ac3f3b6.tar.bz2
chat-111fbb2495e88d69bec29971da8ddf086ac3f3b6.zip
Changed notification preference submission to only be updated when options have actually changed
-rw-r--r--web/react/components/channel_notifications.jsx10
1 files changed, 10 insertions, 0 deletions
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(),