Clean up user data a tad

This commit is contained in:
Jon Staab
2025-11-25 14:19:11 -08:00
parent 250f5c772f
commit 92af4dcfde
6 changed files with 63 additions and 237 deletions
+3 -3
View File
@@ -6,7 +6,7 @@ import {PROFILE, PublishedProfile, RelayProfile} from "@welshman/util"
import {load} from "@welshman/net"
import {throttled} from "@welshman/store"
import {Router} from "@welshman/router"
import {wotGraph, maxWot} from "./wot.js"
import {getWotGraph, getMaxWot} from "./wot.js"
import {profiles} from "./profiles.js"
import {topics, Topic} from "./topics.js"
import {relays} from "./relays.js"
@@ -75,9 +75,9 @@ export const profileSearch = derived(
onSearch: searchProfiles,
getValue: (profile: PublishedProfile) => profile.event.pubkey,
sortFn: ({score = 1, item}) => {
const wotScore = wotGraph.get().get(item.event.pubkey) || 0
const wotScore = getWotGraph().get(item.event.pubkey) || 0
return dec(score) * inc(wotScore / maxWot.get())
return dec(score) * inc(wotScore / getMaxWot())
},
fuseOptions: {
keys: [