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:
Julius Härtl 2021-02-25 16:45:19 +01:00
parent 20094af7f9
commit f3a8b0ac88
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 2 additions and 3 deletions

View File

@ -208,6 +208,8 @@ export default {
const fileInfo = response.data.ocs.data
this.logger.debug('Created new file', fileInfo)
await fileList?.addAndFetchFileInfo(this.name)
// Run default action
const fileAction = OCA.Files.fileActions.getDefaultFileAction(fileInfo.mime, 'file', OC.PERMISSION_ALL)
fileAction.action(fileInfo.basename, {
@ -217,9 +219,6 @@ export default {
fileActions: fileList?.fileActions,
})
// Reload files list
fileList?.reload?.() || window.location.reload()
this.close()
} catch (error) {
this.logger.error('Error while creating the new file from template')