Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Gieling <github@dartcafe.de>2021-03-13 20:23:04 +0300
committerGitHub <noreply@github.com>2021-03-13 20:23:04 +0300
commit7bdf72e8ccc7473d8aae4241c582f7659789e329 (patch)
tree41159bee21647e6c7af08c8216386319827e2dcd /src/js/mixins
parentb9af2a993ea84f2b9ce13fbc9c864e56d6972a0c (diff)
Misc code optimizations (#1484)
* simplify participants determining * simplify calendar list creation * harmonize list commits names * readybility of lastUpdated * centralize poll categories to store * count user's votes with parameter
Diffstat (limited to 'src/js/mixins')
-rw-r--r--src/js/mixins/watchPolls.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/mixins/watchPolls.js b/src/js/mixins/watchPolls.js
index c4c764fb..e8b0d1ab 100644
--- a/src/js/mixins/watchPolls.js
+++ b/src/js/mixins/watchPolls.js
@@ -24,12 +24,12 @@ export const watchPolls = {
async loadTables(tables) {
let dispatches = []
tables.forEach((item) => {
- this.lastUpdated = (item.updated > this.lastUpdated) ? item.updated : this.lastUpdated
+ this.lastUpdated = Math.max(item.updated, this.lastUpdated)
// an updated poll table is reported
if (item.table === 'polls') {
if (this.$route.name !== 'publicVote') {
// load poll list only, when not in public poll
- dispatches.push('polls/load')
+ dispatches.push('polls/list')
}
if (item.pollId === parseInt(this.$route.params.id ?? this.$store.state.share.pollId)) {
// if current poll is affected, load current poll configuration