Remove voice-only rooms from "Other rooms"

This commit is contained in:
mplorentz
2026-03-10 11:51:14 -04:00
parent a7421eb789
commit 97b81b2ddd
2 changed files with 12 additions and 11 deletions
+1 -3
View File
@@ -290,9 +290,7 @@
</label> </label>
{/if} {/if}
{#each $roomSearch.searchValues(term) as h (h)} {#each $roomSearch.searchValues(term) as h (h)}
{#if !$roomsNoText.has(h)} <SpaceMenuRoomItem {replaceState} {url} {h} />
<SpaceMenuRoomItem {replaceState} {url} {h} />
{/if}
{/each} {/each}
{#if $otherVoiceRooms.length > 0} {#if $otherVoiceRooms.length > 0}
<div class="hidden md:block"> <div class="hidden md:block">
+11 -8
View File
@@ -791,17 +791,20 @@ export const deriveUserRooms = (url: string) =>
}) })
export const deriveOtherRooms = (url: string) => export const deriveOtherRooms = (url: string) =>
derived([deriveUserRooms(url), roomsByUrl], ([$userRooms, $roomsByUrl]) => { derived(
const rooms: string[] = [] [deriveUserRooms(url), deriveRoomsNoText(url), roomsByUrl],
([$userRooms, $roomsNoText, $roomsByUrl]) => {
const rooms: string[] = []
for (const {h} of $roomsByUrl.get(url) || []) { for (const {h} of $roomsByUrl.get(url) || []) {
if (!$userRooms.includes(h)) { if (!$userRooms.includes(h) && !$roomsNoText.has(h)) {
rooms.push(h) rooms.push(h)
}
} }
}
return sortBy(roomComparator(url), uniq(rooms)) return sortBy(roomComparator(url), uniq(rooms))
}) },
)
// Space/room memberships // Space/room memberships