X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FImageBrowserPage.kt;fp=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FImageBrowserPage.kt;h=a0ca0d781152018f14d327449fc6627b05c0854b;hp=20219d747c379f1502b2fdfecb7b1017c7063628;hb=5c5bee980f9cab5792e34d1c9840f73b8b191830;hpb=faf66247a34f64946990a985d2ea3003465969cb diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/ImageBrowserPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/ImageBrowserPage.kt index 20219d7..a0ca0d7 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/ImageBrowserPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/ImageBrowserPage.kt @@ -29,9 +29,7 @@ class ImageBrowserPage @Inject constructor(webInterface: WebInterface, loaders: } else if (soneRequest.parameters["mode"] == "gallery") { templateContext["galleryRequested"] = true soneRequest.core.sones - .map(Sone::getRootAlbum) - .flatMap(Album::getAlbums) - .flatMap { Album.FLATTENER.apply(it)!! } + .flatMap(Sone::allAlbums) .filterNot(Album::isEmpty) .sortedBy(Album::getTitle) .also { albums ->