Actually use the new memberlist view
parent
ceb864320f
commit
e6e0360608
|
@ -17,7 +17,6 @@ import RightPanelStore from "../../stores/right-panel/RightPanelStore";
|
||||||
import MatrixClientContext from "../../contexts/MatrixClientContext";
|
import MatrixClientContext from "../../contexts/MatrixClientContext";
|
||||||
import RoomSummaryCard from "../views/right_panel/RoomSummaryCard";
|
import RoomSummaryCard from "../views/right_panel/RoomSummaryCard";
|
||||||
import WidgetCard from "../views/right_panel/WidgetCard";
|
import WidgetCard from "../views/right_panel/WidgetCard";
|
||||||
import MemberList from "../views/rooms/MemberList";
|
|
||||||
import UserInfo from "../views/right_panel/UserInfo";
|
import UserInfo from "../views/right_panel/UserInfo";
|
||||||
import ThirdPartyMemberInfo from "../views/rooms/ThirdPartyMemberInfo";
|
import ThirdPartyMemberInfo from "../views/rooms/ThirdPartyMemberInfo";
|
||||||
import FilePanel from "./FilePanel";
|
import FilePanel from "./FilePanel";
|
||||||
|
@ -34,6 +33,7 @@ import { IRightPanelCard, IRightPanelCardState } from "../../stores/right-panel/
|
||||||
import { Action } from "../../dispatcher/actions";
|
import { Action } from "../../dispatcher/actions";
|
||||||
import { XOR } from "../../@types/common";
|
import { XOR } from "../../@types/common";
|
||||||
import ExtensionsCard from "../views/right_panel/ExtensionsCard";
|
import ExtensionsCard from "../views/right_panel/ExtensionsCard";
|
||||||
|
import MemberListView from "../views/rooms/MemberList/MemberListView";
|
||||||
|
|
||||||
interface BaseProps {
|
interface BaseProps {
|
||||||
overwriteCard?: IRightPanelCard; // used to display a custom card and ignoring the RightPanelStore (used for UserView)
|
overwriteCard?: IRightPanelCard; // used to display a custom card and ignoring the RightPanelStore (used for UserView)
|
||||||
|
@ -57,7 +57,6 @@ type Props = XOR<RoomlessProps, RoomProps>;
|
||||||
|
|
||||||
interface IState {
|
interface IState {
|
||||||
phase?: RightPanelPhases;
|
phase?: RightPanelPhases;
|
||||||
searchQuery: string;
|
|
||||||
cardState?: IRightPanelCardState;
|
cardState?: IRightPanelCardState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,10 +66,6 @@ export default class RightPanel extends React.Component<Props, IState> {
|
||||||
|
|
||||||
public constructor(props: Props, context: React.ContextType<typeof MatrixClientContext>) {
|
public constructor(props: Props, context: React.ContextType<typeof MatrixClientContext>) {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
|
|
||||||
this.state = {
|
|
||||||
searchQuery: "",
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly delayedUpdate = throttle(
|
private readonly delayedUpdate = throttle(
|
||||||
|
@ -147,10 +142,6 @@ export default class RightPanel extends React.Component<Props, IState> {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private onSearchQueryChanged = (searchQuery: string): void => {
|
|
||||||
this.setState({ searchQuery });
|
|
||||||
};
|
|
||||||
|
|
||||||
public render(): React.ReactNode {
|
public render(): React.ReactNode {
|
||||||
let card = <div />;
|
let card = <div />;
|
||||||
const roomId = this.props.room?.roomId;
|
const roomId = this.props.room?.roomId;
|
||||||
|
@ -159,15 +150,7 @@ export default class RightPanel extends React.Component<Props, IState> {
|
||||||
switch (phase) {
|
switch (phase) {
|
||||||
case RightPanelPhases.MemberList:
|
case RightPanelPhases.MemberList:
|
||||||
if (!!roomId) {
|
if (!!roomId) {
|
||||||
card = (
|
card = <MemberListView roomId={roomId} onClose={this.onClose} />;
|
||||||
<MemberList
|
|
||||||
roomId={roomId}
|
|
||||||
key={roomId}
|
|
||||||
onClose={this.onClose}
|
|
||||||
searchQuery={this.state.searchQuery}
|
|
||||||
onSearchQueryChanged={this.onSearchQueryChanged}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue