mirror of
https://github.com/wassname/talk.git
synced 2026-07-13 17:45:56 +08:00
Adapt loading detection
This commit is contained in:
@@ -108,7 +108,7 @@ class UserDetailContainer extends React.Component {
|
||||
return null;
|
||||
}
|
||||
|
||||
const loading = [1, 2, 4].indexOf(this.props.data.networkStatus) >= 0;
|
||||
const loading = this.props.data.loading;
|
||||
|
||||
return <UserDetail
|
||||
bulkReject={this.bulkReject}
|
||||
|
||||
@@ -145,7 +145,11 @@ class StreamContainer extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
if (this.props.refetching) {
|
||||
if (this.props.refetching
|
||||
|| !this.props.root.asset
|
||||
|| !this.props.root.asset.comment
|
||||
&& !this.props.root.asset.comments
|
||||
) {
|
||||
return <Spinner />;
|
||||
}
|
||||
return <Stream
|
||||
|
||||
@@ -53,7 +53,7 @@ class ProfileContainer extends Component {
|
||||
render() {
|
||||
const {auth, auth: {user}, asset, showSignInDialog, stopIgnoringUser} = this.props;
|
||||
const {me} = this.props.root;
|
||||
const loading = [1, 2, 4].indexOf(this.props.data.networkStatus) >= 0;
|
||||
const loading = this.props.data.loading;
|
||||
|
||||
if (!auth.loggedIn) {
|
||||
return <NotLoggedIn showSignInDialog={showSignInDialog} />;
|
||||
|
||||
Reference in New Issue
Block a user