Add a developer mode flag and use it for accessing space timelines (#6994)
Fixes https://github.com/vector-im/element-web/issues/19416
This commit is contained in:
parent
96bd052ecf
commit
d188d32423
7 changed files with 43 additions and 1 deletions
|
@ -108,6 +108,7 @@ interface IProps {
|
|||
currentGroupIsNew?: boolean;
|
||||
justRegistered?: boolean;
|
||||
roomJustCreatedOpts?: IOpts;
|
||||
forceTimeline?: boolean; // see props on MatrixChat
|
||||
}
|
||||
|
||||
interface IUsageLimit {
|
||||
|
@ -611,6 +612,7 @@ class LoggedInView extends React.Component<IProps, IState> {
|
|||
key={this.props.currentRoomId || 'roomview'}
|
||||
resizeNotifier={this.props.resizeNotifier}
|
||||
justCreatedOpts={this.props.roomJustCreatedOpts}
|
||||
forceTimeline={this.props.forceTimeline}
|
||||
/>;
|
||||
break;
|
||||
|
||||
|
|
|
@ -176,6 +176,9 @@ interface IRoomInfo {
|
|||
threepid_invite?: IThreepidInvite;
|
||||
|
||||
justCreatedOpts?: IOpts;
|
||||
|
||||
// Whether or not to override default behaviour to end up at a timeline
|
||||
forceTimeline?: boolean;
|
||||
}
|
||||
/* eslint-enable camelcase */
|
||||
|
||||
|
@ -238,6 +241,7 @@ interface IState {
|
|||
pendingInitialSync?: boolean;
|
||||
justRegistered?: boolean;
|
||||
roomJustCreatedOpts?: IOpts;
|
||||
forceTimeline?: boolean; // see props
|
||||
}
|
||||
|
||||
@replaceableComponent("structures.MatrixChat")
|
||||
|
@ -968,6 +972,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
|||
page_type: PageType.RoomView,
|
||||
threepidInvite: roomInfo.threepid_invite,
|
||||
roomOobData: roomInfo.oob_data,
|
||||
forceTimeline: roomInfo.forceTimeline,
|
||||
ready: true,
|
||||
roomJustCreatedOpts: roomInfo.justCreatedOpts,
|
||||
}, () => {
|
||||
|
|
|
@ -110,6 +110,8 @@ interface IRoomProps extends MatrixClientProps {
|
|||
resizeNotifier: ResizeNotifier;
|
||||
justCreatedOpts?: IOpts;
|
||||
|
||||
forceTimeline?: boolean; // should we force access to the timeline, overriding (for eg) spaces
|
||||
|
||||
// Called with the credentials of a registered user (if they were a ROU that transitioned to PWLU)
|
||||
onRegistered?(credentials: IMatrixClientCreds): void;
|
||||
}
|
||||
|
@ -1911,7 +1913,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
|||
);
|
||||
}
|
||||
|
||||
if (this.state.room?.isSpaceRoom()) {
|
||||
if (this.state.room?.isSpaceRoom() && !this.props.forceTimeline) {
|
||||
return <SpaceRoomView
|
||||
space={this.state.room}
|
||||
justCreatedOpts={this.props.justCreatedOpts}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue