mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #25875 from nextcloud/backport/25797/stable21
[stable21] Do not trigger a full filelist reload after creating a new file from a template
This commit is contained in:
commit
4df7cf1f54
3 changed files with 6 additions and 6 deletions
2
apps/files/js/dist/templates.js
vendored
2
apps/files/js/dist/templates.js
vendored
File diff suppressed because one or more lines are too long
2
apps/files/js/dist/templates.js.map
vendored
2
apps/files/js/dist/templates.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -208,18 +208,18 @@ 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, {
|
||||
$file: null,
|
||||
$file: fileList?.findFileEl(this.name),
|
||||
dir: currentDirectory,
|
||||
fileList,
|
||||
fileActions: fileList?.fileActions,
|
||||
fileInfoModel: fileList?.getModelForFile(this.name),
|
||||
})
|
||||
|
||||
// Reload files list
|
||||
fileList?.reload?.() || window.location.reload()
|
||||
|
||||
this.close()
|
||||
} catch (error) {
|
||||
this.logger.error('Error while creating the new file from template')
|
||||
|
|
|
|||
Loading…
Reference in a new issue