Do not trigger a full filelist reload after creating a new file
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
65db84d0fc
commit
060a0101ae
|
@ -208,6 +208,8 @@ export default {
|
||||||
const fileInfo = response.data.ocs.data
|
const fileInfo = response.data.ocs.data
|
||||||
this.logger.debug('Created new file', fileInfo)
|
this.logger.debug('Created new file', fileInfo)
|
||||||
|
|
||||||
|
await fileList?.addAndFetchFileInfo(this.name)
|
||||||
|
|
||||||
// Run default action
|
// Run default action
|
||||||
const fileAction = OCA.Files.fileActions.getDefaultFileAction(fileInfo.mime, 'file', OC.PERMISSION_ALL)
|
const fileAction = OCA.Files.fileActions.getDefaultFileAction(fileInfo.mime, 'file', OC.PERMISSION_ALL)
|
||||||
fileAction.action(fileInfo.basename, {
|
fileAction.action(fileInfo.basename, {
|
||||||
|
@ -217,9 +219,6 @@ export default {
|
||||||
fileActions: fileList?.fileActions,
|
fileActions: fileList?.fileActions,
|
||||||
})
|
})
|
||||||
|
|
||||||
// Reload files list
|
|
||||||
fileList?.reload?.() || window.location.reload()
|
|
||||||
|
|
||||||
this.close()
|
this.close()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.logger.error('Error while creating the new file from template')
|
this.logger.error('Error while creating the new file from template')
|
||||||
|
|
Loading…
Reference in New Issue