Add function to get all follow sets from cache.
This commit is contained in:
@@ -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> {
|
fun findNotesStartingWith(text: String): List<Note> {
|
||||||
checkNotInMainThread()
|
checkNotInMainThread()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user