Faster user in follow list algo

pull/329/head^2
Vitor Pamplona 2023-04-02 11:42:11 -04:00
rodzic 9afc94c050
commit 67bcc52b25
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -273,7 +273,7 @@ class User(val pubkeyHex: String) {
}
fun transientFollowerCount(): Int {
return LocalCache.users.values.count { it.latestContactList?.let { pubkeyHex in it.unverifiedFollowKeySet() } ?: false }
return LocalCache.users.values.count { it.latestContactList?.isTaggedUser(pubkeyHex) ?: false }
}
fun cachedFollowingKeySet(): Set<HexKey> {
@ -289,7 +289,7 @@ class User(val pubkeyHex: String) {
}
fun cachedFollowerCount(): Int {
return LocalCache.users.values.count { it.latestContactList?.let { pubkeyHex in it.unverifiedFollowKeySet() } ?: false }
return LocalCache.users.values.count { it.latestContactList?.isTaggedUser(pubkeyHex) ?: false }
}
fun hasSentMessagesTo(user: User?): Boolean {