-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix aliasing mimes #1456
base: master
Are you sure you want to change the base?
Fix aliasing mimes #1456
Conversation
/backport to stable25 |
Signed-off-by: John Molakvoæ <[email protected]>
@@ -595,7 +595,7 @@ export default { | |||
fileInfo = this.fileList[this.currentIndex] | |||
|
|||
// show file | |||
this.currentFile = new File(fileInfo, mime, handler.component) | |||
this.currentFile = new File(fileInfo, mime, this.components[mime]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we use the original handler instead of the registered aliases, we break all aliases on file opening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could check again if the override handler is specified, if so we can use the original handler coponent?
const component = overrideHandlerId ? handler.component : this.components[mime];
this.currentFile = new File(fileInfo, mime, component)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we should be consistent on how we do things for other File creations :)
Line 613 in bbcd4ef
this.currentFile = new File(fileInfo, mime, this.components[mime]) |
Line 637 in bbcd4ef
this.previousFile = new File(prev, mime, this.components[mime]) |
Line 647 in bbcd4ef
this.nextFile = new File(next, mime, this.components[mime]) |
Can confirm, this fixes the issue on my nextcloud 25.0.1 instance. |
Doesn't this revert the behaviour back to always use the viewer compontent based on mime type? This would then break the |
It would be nice if this can be worked on. My app camerarawpreviews has quite a few users, and currently does not work with Viewer. I know it did before though. |
@ariselseng Right now this PR is set in draft mode so it's probably being overlooked for formal reviews. Seems to have some positive feedback from testers, but also an outstanding question from @Raudius. I'm not familiar with this area of code so I don't feel qualified commenting one way or another. @skjnldsv: This is your PR - thoughts? Okay to pull this out of draft? Need us find some more folks to test? |
Fix regression by #1273
Fix #1450