feat: added sorting by newest album added

This commit is contained in:
CappielloAntonio 2024-03-16 16:28:33 +01:00
parent 302458e76b
commit 2712b73dac
7 changed files with 47 additions and 0 deletions

View file

@ -161,6 +161,10 @@ public class AlbumCatalogueAdapter extends RecyclerView.Adapter<AlbumCatalogueAd
case Constants.ALBUM_ORDER_BY_RANDOM:
Collections.shuffle(albums);
break;
case Constants.ALBUM_ORDER_BY_RECENTLY_ADDED:
albums.sort(Comparator.comparing(AlbumID3::getCreated));
Collections.reverse(albums);
break;
}
notifyDataSetChanged();