We have an asset folder (folder1) with 150 assets inside and 4 subfolders (folder2, folder3, folder4, folder5) , these subfolders can be empty for the purpose of the demo, but to see the problem they need to be created in any order (in between of the 150 other assets, so no order by modification date is possible) .
When the user enter or browse the folder1 he can only see the first 40 assets (out of 150) and if the folders are spread in the list, he won't be able to order by Type (this is not available in 6.4) the items. So there is no way to see the folders (easily).
There is any way (not extending the com.day.cq.dam.commons.sort.ResourceSorter) to show always the subfolders first on the subfolders???
In case you are looking to sort based on the type of file in list view , please try to go to node /libs/dam/gui/content/commons/availablecolumns/type and overlay the same at your end and change sortable property to true.
Please see if this helps you to serve the purpose.