diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2023-04-07 08:42:56 +0200 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2023-04-11 11:56:04 +0200 |
commit | e3f575ba7a600971278a68eeedd123ae8afcd4b8 (patch) | |
tree | ce0ca02d5f57ca6a20b12295551e812d040d7a04 /apps | |
parent | a16703d18183aa34a7e6ffcb9c9cb3756cfb0c2e (diff) | |
download | nextcloud-server-e3f575ba7a600971278a68eeedd123ae8afcd4b8.tar.gz nextcloud-server-e3f575ba7a600971278a68eeedd123ae8afcd4b8.zip |
fix(files): update @nextcloud/files and fix event store update
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/src/store/files.ts | 20 | ||||
-rw-r--r-- | apps/files/src/store/paths.ts | 4 | ||||
-rw-r--r-- | apps/files/src/store/userconfig.ts | 4 |
3 files changed, 10 insertions, 18 deletions
diff --git a/apps/files/src/store/files.ts b/apps/files/src/store/files.ts index f3289378096..27b6b12f348 100644 --- a/apps/files/src/store/files.ts +++ b/apps/files/src/store/files.ts @@ -81,34 +81,26 @@ export const useFilesStore = () => { Vue.set(this.roots, service, root) }, - onCreatedNode() { - // TODO: do something - }, - onDeletedNode(node: Node) { this.deleteNodes([node]) }, - - onMovedNode() { - // TODO: do something - }, } }) const fileStore = store() // Make sure we only register the listeners once - if (!fileStore.initialized) { - subscribe('files:file:created', fileStore.onCreatedNode) + if (!fileStore._initialized) { + // subscribe('files:file:created', fileStore.onCreatedNode) subscribe('files:file:deleted', fileStore.onDeletedNode) - subscribe('files:file:moved', fileStore.onMovedNode) + // subscribe('files:file:moved', fileStore.onMovedNode) // subscribe('files:file:updated', fileStore.onUpdatedNode) - subscribe('files:folder:created', fileStore.onCreatedNode) + // subscribe('files:folder:created', fileStore.onCreatedNode) subscribe('files:folder:deleted', fileStore.onDeletedNode) - subscribe('files:folder:moved', fileStore.onMovedNode) + // subscribe('files:folder:moved', fileStore.onMovedNode) // subscribe('files:folder:updated', fileStore.onUpdatedNode) - fileStore.initialized = true + fileStore._initialized = true } return fileStore diff --git a/apps/files/src/store/paths.ts b/apps/files/src/store/paths.ts index b0f9552f606..8e458eb87b0 100644 --- a/apps/files/src/store/paths.ts +++ b/apps/files/src/store/paths.ts @@ -56,13 +56,13 @@ export const usePathsStore = () => { const pathsStore = store() // Make sure we only register the listeners once - if (!pathsStore.initialized) { + if (!pathsStore._initialized) { // TODO: watch folders to update paths? // subscribe('files:folder:created', pathsStore.onCreatedNode) // subscribe('files:folder:deleted', pathsStore.onDeletedNode) // subscribe('files:folder:moved', pathsStore.onMovedNode) - pathsStore.initialized = true + pathsStore._initialized = true } return pathsStore diff --git a/apps/files/src/store/userconfig.ts b/apps/files/src/store/userconfig.ts index f771de7cc5c..05d63c95424 100644 --- a/apps/files/src/store/userconfig.ts +++ b/apps/files/src/store/userconfig.ts @@ -63,11 +63,11 @@ export const useUserConfigStore = () => { const userConfigStore = store() // Make sure we only register the listeners once - if (!userConfigStore.initialized) { + if (!userConfigStore._initialized) { subscribe('files:config:updated', function({ key, value }: { key: string, value: boolean }) { userConfigStore.onUpdate(key, value) }) - userConfigStore.initialized = true + userConfigStore._initialized = true } return userConfigStore |