this.state.upvotes = nextProps.post.upvotes;
this.state.downvotes = nextProps.post.downvotes;
this.state.score = nextProps.post.score;
+ if (this.props.post.id !== nextProps.post.id) {
+ this.state.imageExpanded = false;
+ }
this.setState(this.state);
}
post.url = data.post.url;
post.name = data.post.name;
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;
}
}