diff --git a/app/javascript/chat/channels.jsx b/app/javascript/chat/channels.jsx index 19f4bc878..cec991fbe 100644 --- a/app/javascript/chat/channels.jsx +++ b/app/javascript/chat/channels.jsx @@ -52,7 +52,6 @@ const Channels = ({ /> ); }); - console.log(channels); let topNotice = ''; if ( expanded && diff --git a/app/javascript/chat/chat.jsx b/app/javascript/chat/chat.jsx index fa21ae1a8..71d5cd7c4 100644 --- a/app/javascript/chat/chat.jsx +++ b/app/javascript/chat/chat.jsx @@ -205,7 +205,9 @@ export default class Chat extends Component { messageOpened = () => {}; loadChannels = (channels, query) => { - const { activeChannelId, activeChannel } = this.state; + const { activeChannelId } = this.state; + const activeChannel = this.state.activeChannel || + channels.filter((channel) => channel.chat_channel_id === activeChannelId)[0]; if (activeChannelId && query.length === 0) { this.setState({ chatChannels: channels, @@ -1243,7 +1245,11 @@ export default class Chat extends Component { chatChannels={state.chatChannels} unopenedChannelIds={state.unopenedChannelIds} handleSwitchChannel={this.handleSwitchChannel} + channelsLoaded={state.channelsLoaded} + filterQuery={state.filterQuery} expanded={state.expanded} + currentUserId={state.currentUserId} + triggerActiveContent={this.triggerActiveContent} /> {notificationsState}