summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-12-01 14:47:19 -0500
committerChristopher Speller <crspeller@gmail.com>2015-12-01 14:47:19 -0500
commite99437aa3b9444e8249c0900d9e402c7aa1fdecf (patch)
tree0d3d5e733d4ec9341cb82a9993ca1872f2e2a702 /web
parentd0b73c02670a2028125c890742aa7f62e5d0986f (diff)
parent362b9f2f940a242b19fe2d4d1b2e896ad12ab092 (diff)
downloadchat-e99437aa3b9444e8249c0900d9e402c7aa1fdecf.tar.gz
chat-e99437aa3b9444e8249c0900d9e402c7aa1fdecf.tar.bz2
chat-e99437aa3b9444e8249c0900d9e402c7aa1fdecf.zip
Merge pull request #1560 from mattermost/plt-1270
PLT-1270 Fix channel creation errors
Diffstat (limited to 'web')
-rw-r--r--web/react/components/channel_notifications_modal.jsx12
1 files changed, 7 insertions, 5 deletions
diff --git a/web/react/components/channel_notifications_modal.jsx b/web/react/components/channel_notifications_modal.jsx
index 79b769c8a..bae1f13f0 100644
--- a/web/react/components/channel_notifications_modal.jsx
+++ b/web/react/components/channel_notifications_modal.jsx
@@ -32,11 +32,13 @@ export default class ChannelNotificationsModal extends React.Component {
activeSection: ''
};
}
- componentDidMount() {
- ChannelStore.addChangeListener(this.onListenerChange);
- }
- componentWillUnmount() {
- ChannelStore.removeChangeListener(this.onListenerChange);
+ componentWillReceiveProps(nextProps) {
+ if (nextProps.show) {
+ this.onListenerChange();
+ ChannelStore.addChangeListener(this.onListenerChange);
+ } else {
+ ChannelStore.removeChangeListener(this.onListenerChange);
+ }
}
onListenerChange() {
const curChannelId = ChannelStore.getCurrentId();