From 86a92f8c7571b5770eee38225465a85b5d9de9b8 Mon Sep 17 00:00:00 2001 From: Jason Blais Date: Tue, 14 Feb 2017 15:20:38 -0500 Subject: Revert "display loading screen when changing team" (#5403) --- webapp/components/post_view/post_view_cache.jsx | 37 ++++++------------------- 1 file changed, 8 insertions(+), 29 deletions(-) (limited to 'webapp/components/post_view/post_view_cache.jsx') diff --git a/webapp/components/post_view/post_view_cache.jsx b/webapp/components/post_view/post_view_cache.jsx index b0b35a5c0..5cf5b3094 100644 --- a/webapp/components/post_view/post_view_cache.jsx +++ b/webapp/components/post_view/post_view_cache.jsx @@ -2,7 +2,6 @@ // See License.txt for license information import PostViewController from './post_view_controller.jsx'; -import LoadingScreen from 'components/loading_screen.jsx'; import ChannelStore from 'stores/channel_store.jsx'; import UserStore from 'stores/user_store.jsx'; @@ -68,45 +67,25 @@ export default class PostViewCache extends React.Component { }); } - shouldComponentUpdate(nextProps) { - return Boolean(nextProps.channelId); - } - render() { const channels = this.state.channels; const currentChannelId = this.state.currentChannelId; - const valid = this.props.channelId === this.state.currentChannelId; + const postViews = []; - let content; - - if (valid) { - for (let i = 0; i < channels.length; i++) { - postViews.push( - - ); - } - content = postViews; - } else { - content = ( - ); } return (
- {content} + {postViews}
); } } - -PostViewCache.propTypes = { - channelId: React.PropTypes.string.isRequired -}; -- cgit v1.2.3-1-g7c22