mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Added resync for completed todos (#9821)
This commit is contained in:
@@ -331,6 +331,7 @@ export default {
|
||||
this.isUserDropdownOpen = !this.isUserDropdownOpen;
|
||||
},
|
||||
sync () {
|
||||
this.$root.$emit('habitica::resync-requested');
|
||||
return Promise.all([
|
||||
this.$store.dispatch('user:fetch', {forceLoad: true}),
|
||||
this.$store.dispatch('tasks:fetchUserTasks', {forceLoad: true}),
|
||||
|
||||
@@ -467,6 +467,17 @@ export default {
|
||||
this.$root.$on('buyModal::boughtItem', () => {
|
||||
this.forceRefresh = new Date();
|
||||
});
|
||||
|
||||
if (this.type !== 'todo') return;
|
||||
this.$root.$on('habitica::resync-requested', () => {
|
||||
if (this.activeFilters.todo.label !== 'complete2') return;
|
||||
this.loadCompletedTodos(true);
|
||||
});
|
||||
},
|
||||
destroyed () {
|
||||
this.$root.$off('buyModal::boughtItem');
|
||||
if (this.type !== 'todo') return;
|
||||
this.$root.$off('habitica::resync-requested');
|
||||
},
|
||||
methods: {
|
||||
...mapActions({
|
||||
|
||||
Reference in New Issue
Block a user