reload completed tasks after resync is finished - always reload completed tasks (#10614)

This commit is contained in:
negue
2018-08-24 22:04:59 +02:00
committed by Sabe Jones
parent ba307af963
commit 6fb9030b96
3 changed files with 7 additions and 17 deletions

View File

@@ -396,12 +396,13 @@ export default {
toggleUserDropdown () {
this.isUserDropdownOpen = !this.isUserDropdownOpen;
},
sync () {
async sync () {
this.$root.$emit('habitica::resync-requested');
return Promise.all([
await Promise.all([
this.$store.dispatch('user:fetch', {forceLoad: true}),
this.$store.dispatch('tasks:fetchUserTasks', {forceLoad: true}),
]);
this.$root.$emit('habitica::resync-completed');
},
async getUserGroupPlans () {
this.$store.state.groupPlans = await this.$store.dispatch('guilds:getGroupPlans');