Skip to content

Commit

Permalink
fix: respect mimetypes and aliases for file previews
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy committed Oct 15, 2024
1 parent 700aa58 commit 8e822fa
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,18 +375,7 @@ export default {
},
isViewerAvailable() {
if (!OCA.Viewer) {
return false
}
const availableHandlers = OCA.Viewer.availableHandlers
for (let i = 0; i < availableHandlers.length; i++) {
if (availableHandlers[i]?.mimes?.includes && availableHandlers[i].mimes.includes(this.file.mimetype)) {
return true
}
}
return false
return OCA.Viewer?.mimetypes?.includes(this.file.mimetype)
},
isVoiceMessage() {
Expand Down

0 comments on commit 8e822fa

Please sign in to comment.