X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FIndexPage.kt;h=e5685efd0b77f727195f2be650a6e96be284bb51;hp=bf6e0c4e02d1c52cf2294b3665940ba46033f2af;hb=8e313509a42a8c638fcac018dd73dd975bf9cb68;hpb=943bbf6848a5975cb994f75f812ef215af62475f diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/IndexPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/IndexPage.kt index bf6e0c4..e5685ef 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/IndexPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/IndexPage.kt @@ -19,9 +19,7 @@ class IndexPage(template: Template, webInterface: WebInterface, private val post getCurrentSone(freenetRequest.toadletContext)!!.let { currentSone -> (currentSone.posts + currentSone.friends - .map { webInterface.core.getSone(it) } - .filter { it.isPresent } - .map { it.get() } + .mapNotNull(webInterface.core::getSone) .flatMap { it.posts } + webInterface.core.getDirectedPosts(currentSone.id) ).distinct()