diff --git a/ui/src/components/user.tsx b/ui/src/components/user.tsx index 5e5948cd6..468d29801 100644 --- a/ui/src/components/user.tsx +++ b/ui/src/components/user.tsx @@ -93,7 +93,7 @@ export class User extends Component { username: null, follows: [], moderates: [], - loading: false, + loading: true, avatarLoading: false, view: User.getViewFromProps(this.props.match.view), sort: User.getSortTypeFromProps(this.props.match.sort), @@ -208,47 +208,50 @@ export class User extends Component { render() { return (
- {this.state.loading ? ( -
- - - -
- ) : ( -
-
+
+
+
+ {this.state.user.avatar && showAvatars() && ( + + )} + /u/{this.state.username} +
+ {this.state.loading ? (
- {this.state.user.avatar && showAvatars() && ( - - )} - /u/{this.state.username} + + +
- {this.selects()} - -
+ ) : ( + this.selects() + )} + +
+ + {!this.state.loading && (
{this.userInfo()} {this.isCurrentUser && this.userSettings()} {this.moderates()} {this.follows()}
-
- )} + )} +
); } @@ -1042,6 +1045,7 @@ export class User extends Component { UserService.Instance.user.show_avatars; this.state.userSettingsForm.matrix_user_id = this.state.user.matrix_user_id; } + this.state.loading = false; this.setState(this.state); } } else if (res.op == UserOperation.SaveUserSettings) {