fix: fallback WoT score to bootstrap pubkeys (#46) #160

Closed
priyanshu_bharti wants to merge 2 commits from priyanshu_bharti/flotilla:46-fallback-wot-score into dev
Showing only changes of commit cc8f26f1d3 - Show all commits
+6 -3
View File
@@ -45,8 +45,12 @@
return getFollows($pubkey)
})
const hasUserFollows = $derived(follows.length > 0)
const fallbackScore = $derived.by(() => {
const userScoreAvailable = $derived(follows.length > 0)
const score = $derived.by(() => {
if (userScoreAvailable) {
return $userScore
}
const lists = $followLists
const mutes = $muteLists
@@ -68,7 +72,6 @@
return score
})
const score = $derived(hasUserFollows ? $userScore : fallbackScore)
const active = $derived(follows.includes(target))
const normalizedScore = $derived(clamp([0, max], score) / max)
const dashOffset = $derived(100 - 44 * normalizedScore)