Skip to content

Commit

Permalink
Include unsubscribe from file changed event
Browse files Browse the repository at this point in the history
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Signed-off-by: Raul Ferreira <r.ferreira.fuentes@gmail.com>
  • Loading branch information
Raudius committed Jan 11, 2024
1 parent 866bab4 commit aead9ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/files/src/views/FilesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ import type { Upload } from '@nextcloud/upload'
import type { UserConfig } from '../types.ts'
import type { View, ContentsWithRoot } from '@nextcloud/files'

import { emit, subscribe } from '@nextcloud/event-bus'
import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'
import { Folder, Node, Permission } from '@nextcloud/files'
import { getCapabilities } from '@nextcloud/capabilities'
import { join, dirname } from 'path'
Expand Down Expand Up @@ -409,6 +409,10 @@ export default defineComponent({
subscribe('files:node:updated', this.onUpdatedNode)
},

unmounted() {
unsubscribe('files:node:updated', this.onUpdatedNode)
},

methods: {
async fetchContent() {
this.loading = true
Expand Down

0 comments on commit aead9ad

Please sign in to comment.