forked from coracle/flotilla
Small tweaks to room menu
This commit is contained in:
@@ -12,11 +12,12 @@ import {LEGACY_THREAD, deriveEventsForUrl, getMembershipUrls, userMembership} fr
|
||||
|
||||
export const checked = writable<Record<string, number>>({})
|
||||
|
||||
checked.subscribe(v => console.trace("======", v))
|
||||
checked.subscribe(v => console.log("====== checked", v))
|
||||
|
||||
export const deriveChecked = (key: string) => derived(checked, prop(key))
|
||||
|
||||
export const setChecked = (key: string, ts = now()) =>
|
||||
Boolean(console.trace("====== setChecked", key))||
|
||||
checked.update(state => ({...state, [key]: ts}))
|
||||
|
||||
// Filters for various routes
|
||||
|
||||
+1
-5
@@ -597,17 +597,13 @@ export const userRoomsByUrl = withGetter(
|
||||
addToMapKey($userRoomsByUrl, url, room)
|
||||
}
|
||||
|
||||
for (const url of $userRoomsByUrl.keys()) {
|
||||
addToMapKey($userRoomsByUrl, url, GENERAL)
|
||||
}
|
||||
|
||||
return $userRoomsByUrl
|
||||
}),
|
||||
)
|
||||
|
||||
export const deriveUserRooms = (url: string) =>
|
||||
derived(userRoomsByUrl, $userRoomsByUrl =>
|
||||
sortBy(roomComparator(url), Array.from($userRoomsByUrl.get(url) || [])),
|
||||
sortBy(roomComparator(url), uniq(Array.from($userRoomsByUrl.get(url) || []).concat(GENERAL))),
|
||||
)
|
||||
|
||||
export const deriveOtherRooms = (url: string) =>
|
||||
|
||||
Reference in New Issue
Block a user