fix: poll
This commit is contained in:
@@ -927,10 +927,11 @@ class FlowItemRow extends PureComponent {
|
|||||||
if (ans.option === vote) ans.votes += 1;
|
if (ans.option === vote) ans.votes += 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.setState({
|
this.setState(
|
||||||
|
{
|
||||||
info: Object.assign({}, info, { poll: current_poll }),
|
info: Object.assign({}, info, { poll: current_poll }),
|
||||||
});
|
},
|
||||||
|
() => {
|
||||||
API.add_vote(vote, info.pid, this.props.token)
|
API.add_vote(vote, info.pid, this.props.token)
|
||||||
.then((json) => {
|
.then((json) => {
|
||||||
if (json.code !== 0) return;
|
if (json.code !== 0) return;
|
||||||
@@ -943,6 +944,8 @@ class FlowItemRow extends PureComponent {
|
|||||||
console.error(e);
|
console.error(e);
|
||||||
alert('投票失败');
|
alert('投票失败');
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
load_replies(callback, update_count = true) {
|
load_replies(callback, update_count = true) {
|
||||||
|
|||||||
Reference in New Issue
Block a user