Skip to content

Commit

Permalink
Merge pull request #3012 from nextcloud/backport/3010/stable27
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr authored Jun 12, 2023
2 parents abe369f + bb0a1da commit 2087f0e
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/view/FilesAppIntegration.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,18 @@ export default {
if (!this.getFileList() || !this.getFileList().getModelForFile || !this.getFileList()._updateDetailsView) {
return null
}
this.getFileList()._updateDetailsView(this.fileName, false)
this.fileModel = this.getFileList().getModelForFile(this.fileName)
try {
this.getFileList()._updateDetailsView(this.fileName, false)

if (this.fileModel && this.fileModel.on) {
this.fileModel.on('change', () => {
this._addHeaderFileActions()
})
this.fileModel = this.getFileList().getModelForFile(this.fileName)

if (this.fileModel && this.fileModel.on) {
this.fileModel.on('change', () => {
this._addHeaderFileActions()
})
}
} catch (e) {
return null
}

return this.fileModel
Expand Down

0 comments on commit 2087f0e

Please sign in to comment.