-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Move away from OCA.files.getMimeIcon and use OC.MimeType.getIconUrl #17483
Conversation
Would it be safe to remove ajax/mimeicon.php and its routes? Could other apps depend on that? I guess they can. Probably no real way to mark this deprecated then... :S |
Yes, please kill the ajax stuff with 🔥 |
Review time! CC: @PVince81 @Xenopathic @MorrisJobke |
@owncloud-bot retest this please |
|
@rullzer please have a look |
Seems to work here. |
This is the file list from a public link. Regular file list works fine. |
Rebase onto master, it's a regression caused by https://github.com/owncloud/core/pull/16902/files#diff-dafefd9519924bec4efa9f5af4af8e68R765 |
I tested this and it works just fine: (chrome, firefox, IE8)
|
👍 |
@MorrisJobke I did not rebase on master yet. But all should be fixed now. I fixed #17527 here as well. |
@Xenopathic could also be done indeed.. but I can imagine people wanting to map stuff to `httpd/unix-directory'.... But fine with me both ways |
AFAIK we use the mimetype 'dir' all over the place, rather than 'httpd/unix-directory'. |
Since we both use dir and httpd/unix-directory in OC they should map to the same icon. Fixes #17527
@Xenopathic agreed. And fixed. |
Ah need to fix the js unit tests... let me take care of that |
A new inspection was created. |
Unit tests updated... all is fine now... I hope... |
All work 👍 |
Move away from OCA.files.getMimeIcon and use OC.MimeType.getIconUrl
just curious - does this make loading folders faster, too? As you mention it doesn't have to do a request for mimetype for each file anymore... |
@jospoortvliet should be a little snappier. But I did not run any timing benchmarks. |
Just wanted to make sure I wrote no nonsense ;-) thanks! |
Since we now have the fancy OC.MimeType class (#16724) we should actively use it!
This moves the file app away from the getMimeIcon function that did a request for every mimetype to the server
Testing is easy!
TODO: