Have setting to disable notifs for new posts. Fixes #132 (#345)

This commit is contained in:
Dessalines 2021-07-22 16:18:13 -04:00 committed by GitHub
parent e9896eb469
commit 1fd6bbc937
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 52 additions and 9 deletions

View file

@ -490,7 +490,9 @@ export class Community extends Component<any, State> {
} else if (op == UserOperation.CreatePost) {
let data = wsJsonToRes<PostResponse>(msg).data;
this.state.posts.unshift(data.post_view);
notifyPost(data.post_view, this.context.router);
if (UserService.Instance.localUserView?.local_user.show_new_post_notifs) {
notifyPost(data.post_view, this.context.router);
}
this.setState(this.state);
} else if (op == UserOperation.CreatePostLike) {
let data = wsJsonToRes<PostResponse>(msg).data;