Remove voice-only rooms from "Other rooms"
This commit is contained in:
@@ -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
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user