projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace Sone provider interface with Kotlin version
[Sone.git]
/
src
/
main
/
kotlin
/
net
/
pterodactylus
/
sone
/
web
/
pages
/
IndexPage.kt
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
(file)
--- 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
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()
.flatMap { it.posts } +
webInterface.core.getDirectedPosts(currentSone.id)
).distinct()