this.state.communities = res.communities;
this.state.communities.sort((a, b) => b.number_of_subscribers - a.number_of_subscribers);
this.state.loading = false;
+ window.scrollTo(0,0);
this.setState(this.state);
} else if (op == UserOperation.FollowCommunity) {
let res: CommunityResponse = msg;
let res: GetPostsResponse = msg;
this.state.posts = res.posts;
this.state.loading = false;
+ window.scrollTo(0,0);
this.setState(this.state);
} else if (op == UserOperation.CreatePostLike) {
let res: CreatePostLikeResponse = msg;
let res: GetRepliesResponse = msg;
this.state.replies = res.replies;
this.sendRepliesCount();
+ window.scrollTo(0,0);
this.setState(this.state);
} else if (op == UserOperation.EditComment) {
let res: CommentResponse = msg;
let res: GetPostsResponse = msg;
this.state.posts = res.posts;
this.state.loading = false;
+ window.scrollTo(0,0);
this.setState(this.state);
} else if (op == UserOperation.CreatePostLike) {
let res: CreatePostLikeResponse = msg;
} else if (op == UserOperation.GetModlog) {
let res: GetModlogResponse = msg;
this.state.loading = false;
+ window.scrollTo(0,0);
this.setCombined(res);
}
}
this.state.searchResponse = res;
this.state.loading = false;
document.title = `Search - ${this.state.q} - Lemmy`;
+ window.scrollTo(0,0);
this.setState(this.state);
}
this.state.posts = res.posts;
this.state.loading = false;
document.title = `/u/${this.state.user.name} - Lemmy`;
+ window.scrollTo(0,0);
this.setState(this.state);
} else if (op == UserOperation.EditComment) {
let res: CommentResponse = msg;