X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FNewElements.kt;fp=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FNewElements.kt;h=4dd78cb6ab822c83715164c0f6674bf97de0249a;hb=454ad5f433803239d36b21a8fe7ad9570a61cbf6;hp=c45d15e84a0f7092d23800a809c09773319fbf29;hpb=5c1acc9f42d039acb0174e3ab1266d76122675ef;p=Sone.git 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 --- 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::elements) .filter { postVisibilityFilter.isPostVisible(currentSone, it) } - fun newReplies(): Collection = + fun newReplies(currentSone: Sone? = null): Collection = listOf(newReplyNotification, localReplyNotification) .flatMap(ListNotification::elements) - .filter { replyVisibilityFilter.isReplyVisible(null, it) } + .filter { replyVisibilityFilter.isReplyVisible(currentSone, it) } }