Replace Sone provider interface with Kotlin version
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / pages / IndexPage.kt
index bf6e0c4..e5685ef 100644 (file)
@@ -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()