mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-19 03:25:29 +00:00
parent
2a206e1b4d
commit
7fdd41697e
3
ui/src/components/post-listing.tsx
vendored
3
ui/src/components/post-listing.tsx
vendored
@ -101,6 +101,9 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
|||||||
this.state.upvotes = nextProps.post.upvotes;
|
this.state.upvotes = nextProps.post.upvotes;
|
||||||
this.state.downvotes = nextProps.post.downvotes;
|
this.state.downvotes = nextProps.post.downvotes;
|
||||||
this.state.score = nextProps.post.score;
|
this.state.score = nextProps.post.score;
|
||||||
|
if (this.props.post.id !== nextProps.post.id) {
|
||||||
|
this.state.imageExpanded = false;
|
||||||
|
}
|
||||||
this.setState(this.state);
|
this.setState(this.state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
5
ui/src/utils.ts
vendored
5
ui/src/utils.ts
vendored
@ -825,6 +825,11 @@ export function editPostRes(data: PostResponse, post: Post) {
|
|||||||
post.url = data.post.url;
|
post.url = data.post.url;
|
||||||
post.name = data.post.name;
|
post.name = data.post.name;
|
||||||
post.nsfw = data.post.nsfw;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user