Add function to get all follow sets from cache.

This commit is contained in:
KotlinGeekDev
2024-10-23 15:28:50 +01:00
parent 27d9b6384e
commit 0c9bea3c19
@@ -2054,6 +2054,19 @@ object LocalCache {
}
}
fun getFollowSetsFor(user: User): List<AddressableNote> {
checkNotInMainThread()
return addressables
.filter { _, note ->
val listEvent = note.event
(
listEvent is PeopleListEvent &&
user.pubkeyHex == listEvent.pubKey
)
}
}
fun findNotesStartingWith(text: String): List<Note> {
checkNotInMainThread()