Skip to content

Commit

Permalink
Do not trigger a full filelist reload after creating a new file
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr authored and backportbot[bot] committed Mar 2, 2021
1 parent 65db84d commit 060a010
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions apps/files/src/views/TemplatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand All @@ -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')
Expand Down

0 comments on commit 060a010

Please sign in to comment.