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=2f165fcfbefb81ce13fff4c9fd7e908ccf80a8d3;hp=61894298dd1036913132ed3011a096d8789f55bf;hb=107af8767f5dce8c27fa4c91b3ff3bc951140cca;hpb=ac6576e72155b3691ce6e5c56ee0c57eb9ac08c6 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 6189429..2f165fc 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/ImageBrowserPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/ImageBrowserPage.kt @@ -2,10 +2,10 @@ package net.pterodactylus.sone.web.pages import net.pterodactylus.sone.data.Album import net.pterodactylus.sone.data.Sone +import net.pterodactylus.sone.utils.Pagination import net.pterodactylus.sone.utils.parameters import net.pterodactylus.sone.web.WebInterface import net.pterodactylus.sone.web.page.FreenetRequest -import net.pterodactylus.util.collection.Pagination import net.pterodactylus.util.template.Template import net.pterodactylus.util.template.TemplateContext import java.net.URI @@ -34,7 +34,7 @@ class ImageBrowserPage(template: Template, webInterface: WebInterface): .sortedBy(Album::getTitle) .also { albums -> templateContext["albums"] = albums - templateContext["albumPagination"] = Pagination(albums, 12).setPage(request.parameters["page"]?.toIntOrNull() ?: 0) + templateContext["albumPagination"] = Pagination(albums, 12).apply { page = request.parameters["page"]?.toIntOrNull() ?: 0 } } } else { templateContext["soneRequested"] = true