From 5eaf170b0d8ce9660d546191a916763c8cf23c8a Mon Sep 17 00:00:00 2001 From: Kylart Date: Tue, 4 Jul 2017 09:28:36 +0200 Subject: [PATCH] Fixed update time on releases page, would not refresh on refresh --- pages/index.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pages/index.vue b/pages/index.vue index 33dfa65..4d88104 100755 --- a/pages/index.vue +++ b/pages/index.vue @@ -191,7 +191,7 @@ } }, computed: { - releases: function () { + releases () { return this.$store.state.releases } }, @@ -230,8 +230,9 @@ this.$store.commit('setErrorSnackbar', `An error occurred while getting ${name}.`) }) }, - refresh () { - this.$store.dispatch('refreshReleases') + async refresh () { + await this.$store.dispatch('refreshReleases') + this.updateTime() }, print (item) { console.log(`[${(new Date()).toLocaleTimeString()}]: Downloading ${item.name}.`) @@ -240,7 +241,7 @@ this.choiceTitle = name this.$store.commit('setAddToChoice', true) }, - updateTime (store) { + updateTime (store=this.$store) { const updated = store.state.releasesUpdateTime if (updated) { this.lastUpdateTime = updated.fromNow()