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