fix(files): use `files:config:updated` to monitor user config change

Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
pull/47102/head
skjnldsv 2024-08-07 11:06:54 +07:00 committed by nextcloud-command
parent 3da69fca60
commit 40d9b42c84
2 changed files with 2 additions and 4 deletions

@ -43,7 +43,6 @@ export const useUserConfigStore = function(...args) {
await axios.put(generateUrl('/apps/files/api/v1/config/' + key), {
value,
})
emit('files:config:updated', { key, value })
},
},

@ -230,8 +230,6 @@ export default defineComponent({
promise: null as CancelablePromise<ContentsWithRoot> | Promise<ContentsWithRoot> | null,
dirContentsFiltered: [] as INode[],
unsubscribeStoreCallback: () => {},
}
},
@ -466,12 +464,13 @@ export default defineComponent({
subscribe('files:node:updated', this.onUpdatedNode)
// reload on settings change
this.unsubscribeStoreCallback = this.userConfigStore.$subscribe(() => this.fetchContent(), { deep: true })
subscribe('files:config:updated', this.fetchContent)
},
unmounted() {
unsubscribe('files:node:deleted', this.onNodeDeleted)
unsubscribe('files:node:updated', this.onUpdatedNode)
unsubscribe('files:config:updated', this.fetchContent)
},
methods: {