projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🚧 Filter new replies using the current Sone
[Sone.git]
/
src
/
main
/
kotlin
/
net
/
pterodactylus
/
sone
/
web
/
NewElements.kt
diff --git
a/src/main/kotlin/net/pterodactylus/sone/web/NewElements.kt
b/src/main/kotlin/net/pterodactylus/sone/web/NewElements.kt
index
c45d15e
..
4dd78cb
100644
(file)
--- a/
src/main/kotlin/net/pterodactylus/sone/web/NewElements.kt
+++ b/
src/main/kotlin/net/pterodactylus/sone/web/NewElements.kt
@@
-44,9
+44,9
@@
class NewElements @Inject constructor(
.flatMap(ListNotification<Post>::elements)
.filter { postVisibilityFilter.isPostVisible(currentSone, it) }
.flatMap(ListNotification<Post>::elements)
.filter { postVisibilityFilter.isPostVisible(currentSone, it) }
- fun newReplies(): Collection<PostReply> =
+ fun newReplies(
currentSone: Sone? = null
): Collection<PostReply> =
listOf(newReplyNotification, localReplyNotification)
.flatMap(ListNotification<PostReply>::elements)
listOf(newReplyNotification, localReplyNotification)
.flatMap(ListNotification<PostReply>::elements)
- .filter { replyVisibilityFilter.isReplyVisible(
null
, it) }
+ .filter { replyVisibilityFilter.isReplyVisible(
currentSone
, it) }
}
}