mirror of https://github.com/bra1n/townsquare.git
fix race condition causing audible countdown
This commit is contained in:
parent
84f73ceb01
commit
e3b195d3e2
|
@ -180,15 +180,15 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
countdown() {
|
countdown() {
|
||||||
this.$store.commit("session/setVoteInProgress", true);
|
|
||||||
this.$store.commit("session/lockVote", 0);
|
this.$store.commit("session/lockVote", 0);
|
||||||
|
this.$store.commit("session/setVoteInProgress", true);
|
||||||
this.voteTimer = setInterval(() => {
|
this.voteTimer = setInterval(() => {
|
||||||
this.start();
|
this.start();
|
||||||
}, 4000);
|
}, 4000);
|
||||||
},
|
},
|
||||||
start() {
|
start() {
|
||||||
this.$store.commit("session/setVoteInProgress", true);
|
|
||||||
this.$store.commit("session/lockVote", 1);
|
this.$store.commit("session/lockVote", 1);
|
||||||
|
this.$store.commit("session/setVoteInProgress", true);
|
||||||
clearInterval(this.voteTimer);
|
clearInterval(this.voteTimer);
|
||||||
this.voteTimer = setInterval(() => {
|
this.voteTimer = setInterval(() => {
|
||||||
this.$store.commit("session/lockVote");
|
this.$store.commit("session/lockVote");
|
||||||
|
|
Loading…
Reference in New Issue