Skip to content

Commit 75d22dc

Browse files
committed
Include unsubscribe from file changed event
Signed-off-by: nextcloud-command <[email protected]> Signed-off-by: Raul Ferreira <[email protected]>
1 parent b3bf1cf commit 75d22dc

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

apps/files/src/views/FilesList.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ import type { Upload } from '@nextcloud/upload'
122122
import type { UserConfig } from '../types.ts'
123123
import type { View, ContentsWithRoot } from '@nextcloud/files'
124124
125-
import { emit, subscribe } from '@nextcloud/event-bus'
125+
import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'
126126
import { Folder, Node, Permission } from '@nextcloud/files'
127127
import { getCapabilities } from '@nextcloud/capabilities'
128128
import { join, dirname } from 'path'
@@ -439,6 +439,10 @@ export default defineComponent({
439439
subscribe('files:node:updated', this.onUpdatedNode)
440440
},
441441
442+
unmounted() {
443+
unsubscribe('files:node:updated', this.onUpdatedNode)
444+
},
445+
442446
methods: {
443447
async fetchContent() {
444448
this.loading = true

dist/files-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)