Skip to content

Commit

Permalink
Merge pull request #44076 from nextcloud/fix/file-widget-viewer
Browse files Browse the repository at this point in the history
Use viewer to open files still on the simple widget
  • Loading branch information
juliusknorr authored Mar 11, 2024
2 parents 007b924 + 7b92e23 commit 212b297
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions apps/files/src/views/ReferenceFileWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ export default defineComponent({
event.stopPropagation()
event.preventDefault()
this.openFilePicker()
} else if (window?.OCA?.Viewer?.mimetypes.indexOf(this.richObject.mimetype) !== -1 && !window?.OCA?.Viewer?.file) {
event.stopPropagation()
event.preventDefault()
window?.OCA?.Viewer?.open({ path: this.richObject.path })
}
},

Expand Down
Loading

0 comments on commit 212b297

Please sign in to comment.