summaryrefslogtreecommitdiffstats
path: root/web/react/components/channel_notifications.jsx
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-09-30 11:08:36 -0400
committerhmhealey <harrisonmhealey@gmail.com>2015-10-01 08:31:11 -0400
commitc16b9de8dc4924cf2fb243579284e67f55cf3a47 (patch)
treed7780fae809cec0b021281638f25ed7920050b0a /web/react/components/channel_notifications.jsx
parent111fbb2495e88d69bec29971da8ddf086ac3f3b6 (diff)
downloadchat-c16b9de8dc4924cf2fb243579284e67f55cf3a47.tar.gz
chat-c16b9de8dc4924cf2fb243579284e67f55cf3a47.tar.bz2
chat-c16b9de8dc4924cf2fb243579284e67f55cf3a47.zip
Replaced ChannelMember.MarkUnreadLevel with ChannelMember.NotifyProps
Diffstat (limited to 'web/react/components/channel_notifications.jsx')
-rw-r--r--web/react/components/channel_notifications.jsx16
1 files changed, 6 insertions, 10 deletions
diff --git a/web/react/components/channel_notifications.jsx b/web/react/components/channel_notifications.jsx
index eaa1c8255..55c0b5438 100644
--- a/web/react/components/channel_notifications.jsx
+++ b/web/react/components/channel_notifications.jsx
@@ -42,7 +42,7 @@ export default class ChannelNotifications extends React.Component {
const member = ChannelStore.getMember(channelId);
var notifyLevel = member.notify_level;
- var markUnreadLevel = member.mark_unread_level;
+ var markUnreadLevel = member.notify_props.mark_unread;
this.setState({
notifyLevel,
@@ -63,7 +63,7 @@ export default class ChannelNotifications extends React.Component {
const member = ChannelStore.getMember(this.state.channelId);
var notifyLevel = member.notify_level;
- var markUnreadLevel = member.mark_unread_level;
+ var markUnreadLevel = member.notify_props.mark_unread;
var newState = this.state;
newState.notifyLevel = notifyLevel;
@@ -249,7 +249,7 @@ 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) {
+ if (ChannelStore.getMember(channelId).notify_props.mark_unread === markUnreadLevel) {
this.updateSection('');
return;
}
@@ -257,17 +257,13 @@ export default class ChannelNotifications extends React.Component {
const data = {
channel_id: channelId,
user_id: UserStore.getCurrentId(),
- mark_unread_level: markUnreadLevel
+ mark_unread: markUnreadLevel
};
- if (!data.mark_unread_level || data.mark_unread_level.length === 0) {
- return;
- }
-
- Client.updateMarkUnreadLevel(data,
+ Client.updateNotifyProps(data,
() => {
var member = ChannelStore.getMember(channelId);
- member.mark_unread_level = markUnreadLevel;
+ member.notify_props.mark_unread = markUnreadLevel;
ChannelStore.setChannelMember(member);
this.updateSection('');
},