parent
e9896eb469
commit
1fd6bbc937
5 changed files with 52 additions and 9 deletions
|
@ -849,17 +849,31 @@ export class Home extends Component<any, HomeState> {
|
|||
.includes(data.post_view.community.id)
|
||||
) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
} else if (this.state.listingType == ListingType.Local) {
|
||||
// If you're on the local view, only push it if its local
|
||||
if (data.post_view.post.local) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue