mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Refresh FileList on current folder update
Signed-off-by: Raul Ferreira <r.ferreira.fuentes@gmail.com>
This commit is contained in:
parent
29c936d8a6
commit
ef2db702f7
1 changed files with 13 additions and 1 deletions
|
|
@ -122,7 +122,7 @@ import type { Upload } from '@nextcloud/upload'
|
|||
import type { UserConfig } from '../types.ts'
|
||||
import type { View, ContentsWithRoot } from '@nextcloud/files'
|
||||
|
||||
import { emit } from '@nextcloud/event-bus'
|
||||
import { emit, subscribe } from '@nextcloud/event-bus'
|
||||
import { Folder, Node, Permission } from '@nextcloud/files'
|
||||
import { getCapabilities } from '@nextcloud/capabilities'
|
||||
import { join, dirname } from 'path'
|
||||
|
|
@ -436,6 +436,7 @@ export default defineComponent({
|
|||
|
||||
mounted() {
|
||||
this.fetchContent()
|
||||
subscribe('files:node:updated', this.onUpdateNode)
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
@ -556,6 +557,17 @@ export default defineComponent({
|
|||
showError(this.t('files', 'Unknown error during upload'))
|
||||
},
|
||||
|
||||
/**
|
||||
* Refreshes the current folder on update.
|
||||
*
|
||||
* @param {Node} node is the file/folder being updated.
|
||||
*/
|
||||
onUpdatedNode(node) {
|
||||
if (node.fileid === this.currentFolder.fileid) {
|
||||
this.fetchContent()
|
||||
}
|
||||
},
|
||||
|
||||
openSharingSidebar() {
|
||||
if (window?.OCA?.Files?.Sidebar?.setActiveTab) {
|
||||
window.OCA.Files.Sidebar.setActiveTab('sharing')
|
||||
|
|
|
|||
Loading…
Reference in a new issue