Use knock rooms sync to reflect the knock state (#11596)
Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
This commit is contained in:
parent
bb91df1d3c
commit
5cf2e1514b
6 changed files with 10 additions and 46 deletions
|
@ -245,7 +245,6 @@ export interface IRoomState {
|
|||
|
||||
canAskToJoin: boolean;
|
||||
promptAskToJoin: boolean;
|
||||
knocked: boolean;
|
||||
}
|
||||
|
||||
interface LocalRoomViewProps {
|
||||
|
@ -458,7 +457,6 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
|||
msc3946ProcessDynamicPredecessor: SettingsStore.getValue("feature_dynamic_room_predecessors"),
|
||||
canAskToJoin: this.askToJoinEnabled,
|
||||
promptAskToJoin: false,
|
||||
knocked: false,
|
||||
};
|
||||
|
||||
this.dispatcherRef = dis.register(this.onAction);
|
||||
|
@ -664,7 +662,6 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
|||
: false,
|
||||
activeCall: roomId ? CallStore.instance.getActiveCall(roomId) : null,
|
||||
promptAskToJoin: this.context.roomViewStore.promptAskToJoin(),
|
||||
knocked: this.context.roomViewStore.knocked(),
|
||||
};
|
||||
|
||||
if (
|
||||
|
@ -2118,7 +2115,6 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
|||
signUrl={this.props.threepidInvite?.signUrl}
|
||||
roomId={this.state.roomId}
|
||||
promptAskToJoin={this.state.promptAskToJoin}
|
||||
knocked={this.state.knocked}
|
||||
onSubmitAskToJoin={this.onSubmitAskToJoin}
|
||||
onCancelAskToJoin={this.onCancelAskToJoin}
|
||||
/>
|
||||
|
@ -2202,7 +2198,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
|||
<RoomPreviewBar
|
||||
room={this.state.room}
|
||||
promptAskToJoin={myMembership === "leave" || this.state.promptAskToJoin}
|
||||
knocked={myMembership === "knock" || this.state.knocked}
|
||||
knocked={myMembership === "knock"}
|
||||
onSubmitAskToJoin={this.onSubmitAskToJoin}
|
||||
onCancelAskToJoin={this.onCancelAskToJoin}
|
||||
onForgetClick={this.onForgetClick}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue