Faster user in follow list algo
This commit is contained in:
@@ -273,7 +273,7 @@ class User(val pubkeyHex: String) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun transientFollowerCount(): Int {
|
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> {
|
fun cachedFollowingKeySet(): Set<HexKey> {
|
||||||
@@ -289,7 +289,7 @@ class User(val pubkeyHex: String) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun cachedFollowerCount(): Int {
|
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 {
|
fun hasSentMessagesTo(user: User?): Boolean {
|
||||||
|
|||||||
Reference in New Issue
Block a user