Just use server count (#4499)

* Just use server count

* Fix count
zio/stable
Eric Bailey 2024-06-12 16:52:00 -05:00 committed by GitHub
parent 99078bbff2
commit a55f924639
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 9 deletions

View File

@ -82,15 +82,6 @@ function KnownFollowersInner({
t.atoms.text_contrast_medium,
]
// list of users, minus blocks
const returnedCount = cachedKnownFollowers.followers.length
// db count, includes blocks
const fullCount = cachedKnownFollowers.count
// knownFollowers can return up to 5 users, but will exclude blocks
// therefore, if we have less 5 users, use whichever count is lower
const count =
returnedCount < 5 ? Math.min(fullCount, returnedCount) : fullCount
const slice = cachedKnownFollowers.followers.slice(0, 3).map(f => {
const moderation = moderateProfile(f, moderationOpts)
return {
@ -104,6 +95,7 @@ function KnownFollowersInner({
moderation,
}
})
const count = cachedKnownFollowers.count - Math.min(slice.length, 2)
return (
<Link