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: {
|
||||
countdown() {
|
||||
this.$store.commit("session/setVoteInProgress", true);
|
||||
this.$store.commit("session/lockVote", 0);
|
||||
this.$store.commit("session/setVoteInProgress", true);
|
||||
this.voteTimer = setInterval(() => {
|
||||
this.start();
|
||||
}, 4000);
|
||||
},
|
||||
start() {
|
||||
this.$store.commit("session/setVoteInProgress", true);
|
||||
this.$store.commit("session/lockVote", 1);
|
||||
this.$store.commit("session/setVoteInProgress", true);
|
||||
clearInterval(this.voteTimer);
|
||||
this.voteTimer = setInterval(() => {
|
||||
this.$store.commit("session/lockVote");
|
||||
|
|
Loading…
Reference in New Issue