Add comments in lieu of type

and fix else block
This commit is contained in:
David Baker 2025-10-31 12:53:37 +00:00
parent 2b05d51e41
commit d433a6b804
2 changed files with 10 additions and 4 deletions

View File

@ -1924,10 +1924,8 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
userId: userId,
subAction: params?.action,
});
} else {
if (ModuleApi.instance.navigation.locationRenderers.get(screen)) {
this.setState({ page_type: screen });
}
} else if (ModuleApi.instance.navigation.locationRenderers.get(screen)) {
this.setState({ page_type: screen });
}
}

View File

@ -42,6 +42,14 @@ export const getMetaSpaceName = (spaceKey: MetaSpace, allRoomsInHome = false): s
}
};
/**
* This can be:
* - a MetaSpace
* - space ID (ie. a room ID)
* - A 'custom' space from a module
* Unfortunately we can't type the last set as we don't know what modules will define,
* so we can't do better than string here.
*/
export type SpaceKey = string;
export interface ISuggestedRoom extends HierarchyRoom {