mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-15 11:40:29 +03:00
Fix unknown rooms in space lobby (#2224)
* add hook to fetch one level of space hierarchy * add enable param to level hierarchy hook * improve HierarchyItem types * fix type errors in lobby * load space hierarachy per level * fix menu item visibility * fix unknown spaces over federation * show inaccessible rooms only to admins * fix unknown room renders loading content twice * fix unknown room visible to normal user if space all room are unknown * show no rooms card if space does not have any room
This commit is contained in:
parent
f121cc0a24
commit
7c6ab366af
7 changed files with 564 additions and 330 deletions
|
|
@ -155,7 +155,7 @@ function SettingsMenuItem({
|
|||
disabled?: boolean;
|
||||
}) {
|
||||
const handleSettings = () => {
|
||||
if (item.space) {
|
||||
if ('space' in item) {
|
||||
openSpaceSettings(item.roomId);
|
||||
} else {
|
||||
toggleRoomSettings(item.roomId);
|
||||
|
|
@ -271,7 +271,7 @@ export function HierarchyItemMenu({
|
|||
</Text>
|
||||
</MenuItem>
|
||||
{promptLeave &&
|
||||
(item.space ? (
|
||||
('space' in item ? (
|
||||
<LeaveSpacePrompt
|
||||
roomId={item.roomId}
|
||||
onDone={handleRequestClose}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue