Makes sure the list is not empty before building the filter

This commit is contained in:
Vitor Pamplona
2025-07-10 14:52:27 -04:00
parent f1d39b8517
commit 94a7d9cf14

View File

@@ -81,6 +81,7 @@ fun filterRepliesAndReactionsToNotes(
val since = since?.get(it.key)?.time
val sortedList = it.value.sorted()
val relay = it.key
if (sortedList.isNotEmpty()) {
listOf(
RelayBasedFilter(
relay = relay,
@@ -114,5 +115,8 @@ fun filterRepliesAndReactionsToNotes(
),
),
)
} else {
emptyList()
}
}
}