From 6d3b3162b031594568b045943422fcac2b2471d1 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Tue, 1 Nov 2016 08:34:52 -0400 Subject: Fixes for creating teams (#4387) --- webapp/components/channel_notifications_modal.jsx | 2 +- webapp/components/create_team/components/team_url.jsx | 2 ++ webapp/stores/channel_store.jsx | 1 + webapp/utils/async_client.jsx | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) (limited to 'webapp') diff --git a/webapp/components/channel_notifications_modal.jsx b/webapp/components/channel_notifications_modal.jsx index 91563a096..59ec40d84 100644 --- a/webapp/components/channel_notifications_modal.jsx +++ b/webapp/components/channel_notifications_modal.jsx @@ -80,7 +80,7 @@ export default class ChannelNotificationsModal extends React.Component { } createNotifyLevelSection(serverError) { // Get glabal user setting for notifications - const globalNotifyLevel = this.props.currentUser.notify_props.desktop; + const globalNotifyLevel = this.props.currentUser.notify_props ? this.props.currentUser.notify_props.desktop : 'all'; let globalNotifyLevelName; if (globalNotifyLevel === 'all') { globalNotifyLevelName = ( diff --git a/webapp/components/create_team/components/team_url.jsx b/webapp/components/create_team/components/team_url.jsx index 222755197..4bea240da 100644 --- a/webapp/components/create_team/components/team_url.jsx +++ b/webapp/components/create_team/components/team_url.jsx @@ -27,11 +27,13 @@ export default class TeamUrl extends React.Component { isLoading: false }; } + submitBack(e) { e.preventDefault(); this.props.state.wizard = 'display_name'; this.props.updateParent(this.props.state); } + submitNext(e) { e.preventDefault(); diff --git a/webapp/stores/channel_store.jsx b/webapp/stores/channel_store.jsx index f0258d02a..3212c1155 100644 --- a/webapp/stores/channel_store.jsx +++ b/webapp/stores/channel_store.jsx @@ -400,6 +400,7 @@ ChannelStore.dispatchToken = AppDispatcher.register((payload) => { ChannelStore.resetCounts(currentId); } ChannelStore.setUnreadCountsByMembers(action.members); + ChannelStore.emitChange(); break; case ActionTypes.RECEIVED_MORE_CHANNELS: ChannelStore.storeMoreChannels(action.channels); diff --git a/webapp/utils/async_client.jsx b/webapp/utils/async_client.jsx index 67100ea3f..c23270216 100644 --- a/webapp/utils/async_client.jsx +++ b/webapp/utils/async_client.jsx @@ -243,7 +243,7 @@ export function getMoreChannels(force) { } export function getChannelStats(channelId = ChannelStore.getCurrentId()) { - if (isCallInProgress('getChannelStats' + channelId)) { + if (isCallInProgress('getChannelStats' + channelId) || channelId == null) { return; } -- cgit v1.2.3-1-g7c22