X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FSone.kt;fp=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FSone.kt;h=46ff3362cf540edd75a382a5a4167460b74f1d8f;hp=3f70ad715ee194dbff92ee055c09700b64a2d99a;hb=5473139d890c40c85712f59ba534583961c2772e;hpb=509b81185b3a1e82bb78308640d0d7b6b741d3e0 diff --git a/src/main/kotlin/net/pterodactylus/sone/data/Sone.kt b/src/main/kotlin/net/pterodactylus/sone/data/Sone.kt index 3f70ad7..46ff336 100644 --- a/src/main/kotlin/net/pterodactylus/sone/data/Sone.kt +++ b/src/main/kotlin/net/pterodactylus/sone/data/Sone.kt @@ -51,3 +51,7 @@ val postCountComparator: Comparator = val imageCountComparator: Comparator = comparing { it.rootAlbum.allImages.size }.reversed() + +val Sone.allAlbums: List + get() = + rootAlbum.albums.flatMap(Album::allAlbums)