mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-25 23:45:13 +00:00
fix(client): Reactivate poll
This commit is contained in:
parent
c6837b9fdf
commit
2522e7388d
1 changed files with 10 additions and 10 deletions
|
@ -406,18 +406,18 @@ export default Vue.extend({
|
||||||
...this.appearNote,
|
...this.appearNote,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const choices = [...this.appearNote.poll.choices];
|
||||||
|
choices[choice] = {
|
||||||
|
...choices[choice],
|
||||||
|
votes: choices[choice].votes + 1,
|
||||||
|
...(body.userId === this.$store.state.i.id ? {
|
||||||
|
isVoted: true
|
||||||
|
} : {})
|
||||||
|
};
|
||||||
|
|
||||||
n.poll = {
|
n.poll = {
|
||||||
...this.appearNote.poll,
|
...this.appearNote.poll,
|
||||||
choices: {
|
choices: choices
|
||||||
...this.appearNote.poll.choices,
|
|
||||||
[choice]: {
|
|
||||||
...this.appearNote.poll.choices[choice],
|
|
||||||
votes: this.appearNote.poll.choices[choice].votes + 1,
|
|
||||||
...(body.userId === this.$store.state.i.id ? {
|
|
||||||
isVoted: true
|
|
||||||
} : {})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.updateAppearNote(n);
|
this.updateAppearNote(n);
|
||||||
|
|
Loading…
Reference in a new issue