summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorJason Blais <jason@spinpunch.com>2017-02-14 15:20:38 -0500
committerCorey Hulen <corey@hulen.com>2017-02-14 15:20:38 -0500
commit86a92f8c7571b5770eee38225465a85b5d9de9b8 (patch)
tree1d958935e729475166545673bdab76450ce4f324 /webapp
parent247ac8d1cca1072a9b808b0e91912257e06a5d0f (diff)
downloadchat-86a92f8c7571b5770eee38225465a85b5d9de9b8.tar.gz
chat-86a92f8c7571b5770eee38225465a85b5d9de9b8.tar.bz2
chat-86a92f8c7571b5770eee38225465a85b5d9de9b8.zip
Revert "display loading screen when changing team" (#5403)
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/channel_view.jsx4
-rw-r--r--webapp/components/post_view/post_view_cache.jsx37
2 files changed, 9 insertions, 32 deletions
diff --git a/webapp/components/channel_view.jsx b/webapp/components/channel_view.jsx
index dfeeeca28..ff101bca7 100644
--- a/webapp/components/channel_view.jsx
+++ b/webapp/components/channel_view.jsx
@@ -70,9 +70,7 @@ export default class ChannelView extends React.Component {
<ChannelHeader
channelId={this.state.channelId}
/>
- <PostViewCache
- channelId={this.state.channelId}
- />
+ <PostViewCache/>
<div
className='post-create__container'
id='post-create'
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(
- <PostViewController
- key={'postviewcontroller_' + channels[i].id}
- channel={channels[i]}
- active={channels[i].id === currentChannelId}
- />
- );
- }
- content = postViews;
- } else {
- content = (
- <LoadingScreen
- position='absolute'
- key='loading'
+ for (let i = 0; i < channels.length; i++) {
+ postViews.push(
+ <PostViewController
+ key={'postviewcontroller_' + channels[i].id}
+ channel={channels[i]}
+ active={channels[i].id === currentChannelId}
/>
);
}
return (
<div id='post-list'>
- {content}
+ {postViews}
</div>
);
}
}
-
-PostViewCache.propTypes = {
- channelId: React.PropTypes.string.isRequired
-};