fix vote timer (closes #22)

This commit is contained in:
Steffen 2020-06-07 21:40:04 +02:00
parent a88cb45fb1
commit 080b1314ad
No known key found for this signature in database
GPG Key ID: 764D74E98267DFC6
2 changed files with 4 additions and 1 deletions

View File

@ -85,6 +85,7 @@ export default {
methods: {
start() {
this.$store.commit("session/lockVote");
clearInterval(this.voteTimer);
this.voteTimer = setInterval(() => {
this.$store.commit("session/lockVote");
if (this.session.lockedVote > this.players.length) {
@ -93,10 +94,11 @@ export default {
}, 3000);
},
stop() {
this.$store.commit("session/lockVote", 0);
clearInterval(this.voteTimer);
this.$store.commit("session/lockVote", 0);
},
finish() {
clearInterval(this.voteTimer);
this.$store.commit("session/nomination", false);
},
vote(vote) {

View File

@ -176,6 +176,7 @@ class LiveSession {
* Update the gamestate based on incoming data.
* @param gamestate
* @param edition
* @param nomination
* @private
*/
_updateGamestate({ gamestate, edition, nomination }) {