diff options
author | dartcafe <github@dartcafe.de> | 2021-07-10 11:37:04 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2021-07-10 11:37:04 +0300 |
commit | 6a37d979c1d97e87cb2847be5e4010ec425c1e0d (patch) | |
tree | 82b675cde71e5059d455e59e73abe5f719e7c59b /src/js/mixins/watchPolls.js | |
parent | e72ccd97ebad7e5b45f4678de78447e4dc196c31 (diff) |
load poll list inside navigation view and not in app
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js/mixins/watchPolls.js')
-rw-r--r-- | src/js/mixins/watchPolls.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/js/mixins/watchPolls.js b/src/js/mixins/watchPolls.js index ea8223a6..29ddebb9 100644 --- a/src/js/mixins/watchPolls.js +++ b/src/js/mixins/watchPolls.js @@ -2,6 +2,7 @@ import axios from '@nextcloud/axios' import { generateUrl } from '@nextcloud/router' import exception from '../Exceptions/Exceptions' +import { emit } from '@nextcloud/event-bus' export const watchPolls = { data() { @@ -26,12 +27,8 @@ export const watchPolls = { let dispatches = [] tables.forEach((item) => { 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 = [...dispatches, 'polls/list'] - } + emit('update-polls') if (item.pollId === parseInt(this.$route.params.id ?? this.$store.state.share.pollId)) { // if current poll is affected, load current poll configuration // load also options and votes |