mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-29 08:21:20 +00:00
Bump paravel
This commit is contained in:
parent
aa31b088e0
commit
7a80ac53ff
@ -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",
|
||||
|
@ -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()))
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user