Remove voice-only rooms from "Other rooms"
This commit is contained in:
@@ -290,9 +290,7 @@
|
||||
</label>
|
||||
{/if}
|
||||
{#each $roomSearch.searchValues(term) as h (h)}
|
||||
{#if !$roomsNoText.has(h)}
|
||||
<SpaceMenuRoomItem {replaceState} {url} {h} />
|
||||
{/if}
|
||||
<SpaceMenuRoomItem {replaceState} {url} {h} />
|
||||
{/each}
|
||||
{#if $otherVoiceRooms.length > 0}
|
||||
<div class="hidden md:block">
|
||||
|
||||
+11
-8
@@ -791,17 +791,20 @@ export const deriveUserRooms = (url: string) =>
|
||||
})
|
||||
|
||||
export const deriveOtherRooms = (url: string) =>
|
||||
derived([deriveUserRooms(url), roomsByUrl], ([$userRooms, $roomsByUrl]) => {
|
||||
const rooms: string[] = []
|
||||
derived(
|
||||
[deriveUserRooms(url), deriveRoomsNoText(url), roomsByUrl],
|
||||
([$userRooms, $roomsNoText, $roomsByUrl]) => {
|
||||
const rooms: string[] = []
|
||||
|
||||
for (const {h} of $roomsByUrl.get(url) || []) {
|
||||
if (!$userRooms.includes(h)) {
|
||||
rooms.push(h)
|
||||
for (const {h} of $roomsByUrl.get(url) || []) {
|
||||
if (!$userRooms.includes(h) && !$roomsNoText.has(h)) {
|
||||
rooms.push(h)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return sortBy(roomComparator(url), uniq(rooms))
|
||||
})
|
||||
return sortBy(roomComparator(url), uniq(rooms))
|
||||
},
|
||||
)
|
||||
|
||||
// Space/room memberships
|
||||
|
||||
|
||||
Reference in New Issue
Block a user