viewer
viewer copied to clipboard
Fix aliasing mimes
A re-implementation of #1456 as that seems to have been abandoned. This issue mainly affects the use of ariariselseng/camerarawpreviews.
Fixes #1450 and ariselseng/camerarawpreviews#99.
I haven't noticed any regressions when testing this on my local environment and don't see any reason to not change the instantiation of this.currentFile
to use this.components[mime]
instead of handler.component
. This is the approach already used for this.nextFile
and this.previousFile
.
This also fixes a regression in Viewer.js, allowing no mimes (only aliases) to be provided to registerHandler
.
Are you sure that it does not break the overrideHandlerId feature?
@kesselb I'm not too familiar with that feature. It looks like it could break that, but in that case I'm not convinced it was working correctly to start with.
The assignments of nextFile and previousFile use this.components[mime] anyway so the initial file you click on would work with the overrideHandlerId function but if you go to the next file, it wouldn't work?
Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
Thank you for contributing to Nextcloud and we hope to hear from you soon!
@szaimen @skjnldsv I believe you two are the maintainers of this app, is this on your radar? Please make sure that you get pinged if apps you maintain get a community PR, and if you don't have the time to review it you raise this to your team lead
@DaphneMuller this creates other issues, so it's staled until we have proper planning to resolve those issues.
@skjnldsv My app camerarawpreviews has been broken due to this since at least Nextcloud 24. It would be great to get this merged/resolved soon. If you browse the issues at camerarawpreviews github repo there is a few duplicate issues every now and then about this.