mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-21 22:27:11 +00:00
Fixing websockets.
This commit is contained in:
parent
57a7de64c0
commit
c14ec3beb7
|
@ -533,7 +533,7 @@ export class Community extends Component<any, State> {
|
|||
let data = wsJsonToRes<CommentResponse>(msg).data;
|
||||
|
||||
// Necessary since it might be a user reply
|
||||
if (data.recipient_ids.length == 0) {
|
||||
if (data.form_id) {
|
||||
this.state.comments.unshift(data.comment_view);
|
||||
this.setState(this.state);
|
||||
}
|
||||
|
|
|
@ -798,7 +798,7 @@ export class Main extends Component<any, MainState> {
|
|||
let data = wsJsonToRes<CommentResponse>(msg).data;
|
||||
|
||||
// Necessary since it might be a user reply
|
||||
if (data.recipient_ids.length == 0) {
|
||||
if (data.form_id) {
|
||||
// If you're on subscribed, only push it if you're subscribed.
|
||||
if (this.state.listingType == ListingType.Subscribed) {
|
||||
if (
|
||||
|
|
|
@ -479,8 +479,8 @@ export class Post extends Component<any, PostState> {
|
|||
} else if (op == UserOperation.CreateComment) {
|
||||
let data = wsJsonToRes<CommentResponse>(msg).data;
|
||||
|
||||
// Necessary since it might be a user reply
|
||||
if (data.recipient_ids.length == 0) {
|
||||
// Necessary since it might be a user reply, which has the form_id removed
|
||||
if (data.form_id) {
|
||||
this.state.postRes.comments.unshift(data.comment_view);
|
||||
this.setState(this.state);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue