Bump paravel

This commit is contained in:
Jon Staab 2024-03-06 09:11:23 -08:00
parent aa31b088e0
commit 7a80ac53ff
3 changed files with 15 additions and 4 deletions

View File

@ -65,7 +65,7 @@
"normalize-url": "^8.0.0",
"nostr-tools": "^2.1.5",
"npm-run-all": "^4.1.5",
"paravel": "https://github.com/coracle-social/paravel.git#new-tags",
"paravel": "^0.5.0",
"qr-scanner": "^1.4.2",
"qrcode": "^1.5.3",
"ramda": "^0.29.1",

View File

@ -9,6 +9,17 @@ export const lists = derivedCollection<List>("address", [_lists, deletes], ([$l,
$l.filter(l => !$d.has(l.address)),
)
export const userLists = derivedCollection<List>("address", [lists, pubkey], ([$l, $pk]) =>
sortBy((l: any) => (l.title || l.name).toLowerCase(), $l.filter(whereEq({pubkey: $pk}))),
)
export const userLists = derivedCollection<List>("address", [lists, pubkey], ([$l, $pk]) => {
const m = new Map()
const getName = (l: any) => (l.title || l.name).toLowerCase()
for (const list of $l.filter(whereEq({pubkey: $pk}))) {
const name = getName(list)
if (!m.has(name) || list.address.startsWith("30003")) {
m.set(name, list)
}
}
return sortBy(getName, Array.from(m.values()))
})

BIN
yarn.lock

Binary file not shown.