diff --git a/ui/src/components/post-listing.tsx b/ui/src/components/post-listing.tsx index 418fe7b4..a47aba99 100644 --- a/ui/src/components/post-listing.tsx +++ b/ui/src/components/post-listing.tsx @@ -101,6 +101,9 @@ export class PostListing extends Component { this.state.upvotes = nextProps.post.upvotes; this.state.downvotes = nextProps.post.downvotes; this.state.score = nextProps.post.score; + if (this.props.post.id !== nextProps.post.id) { + this.state.imageExpanded = false; + } this.setState(this.state); } diff --git a/ui/src/components/sponsors.tsx b/ui/src/components/sponsors.tsx index 6ff9b2ca..5d7bed8e 100644 --- a/ui/src/components/sponsors.tsx +++ b/ui/src/components/sponsors.tsx @@ -17,6 +17,8 @@ interface SilverUser { } let general = [ + 'Rachel Schmitz', + 'comradeda', 'ybaumy', 'dude in phx', 'twilight loki', diff --git a/ui/src/components/user.tsx b/ui/src/components/user.tsx index 5e5948cd..468d2980 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) { diff --git a/ui/src/utils.ts b/ui/src/utils.ts index 2bede777..96047765 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -825,6 +825,11 @@ export function editPostRes(data: PostResponse, post: Post) { post.url = data.post.url; post.name = data.post.name; post.nsfw = data.post.nsfw; + post.deleted = data.post.deleted; + post.removed = data.post.removed; + post.stickied = data.post.stickied; + post.body = data.post.body; + post.locked = data.post.locked; } }