Iterate PR first round
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
parent
e4cf7314f5
commit
44141bf048
|
@ -25,6 +25,7 @@ import { MatrixClientPeg } from '../../MatrixClientPeg';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import MatrixClientContext from "../../contexts/MatrixClientContext";
|
import MatrixClientContext from "../../contexts/MatrixClientContext";
|
||||||
import AutoHideScrollbar from "./AutoHideScrollbar";
|
import AutoHideScrollbar from "./AutoHideScrollbar";
|
||||||
|
import { ActionPayload } from "../../dispatcher/payloads";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
// URL to request embedded page content from
|
// URL to request embedded page content from
|
||||||
|
@ -44,13 +45,11 @@ interface IState {
|
||||||
export default class EmbeddedPage extends React.PureComponent<IProps, IState> {
|
export default class EmbeddedPage extends React.PureComponent<IProps, IState> {
|
||||||
public static contextType = MatrixClientContext;
|
public static contextType = MatrixClientContext;
|
||||||
private unmounted = false;
|
private unmounted = false;
|
||||||
private dispatcherRef: string;
|
private dispatcherRef: string = null;
|
||||||
|
|
||||||
constructor(props: IProps, context: typeof MatrixClientContext) {
|
constructor(props: IProps, context: typeof MatrixClientContext) {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
|
|
||||||
this.dispatcherRef = null;
|
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
page: '',
|
page: '',
|
||||||
};
|
};
|
||||||
|
@ -105,7 +104,7 @@ export default class EmbeddedPage extends React.PureComponent<IProps, IState> {
|
||||||
if (this.dispatcherRef !== null) dis.unregister(this.dispatcherRef);
|
if (this.dispatcherRef !== null) dis.unregister(this.dispatcherRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
private onAction = (payload): void => {
|
private onAction = (payload: ActionPayload): void => {
|
||||||
// HACK: Workaround for the context's MatrixClient not being set up at render time.
|
// HACK: Workaround for the context's MatrixClient not being set up at render time.
|
||||||
if (payload.action === 'client_started') {
|
if (payload.action === 'client_started') {
|
||||||
this.forceUpdate();
|
this.forceUpdate();
|
||||||
|
|
|
@ -18,8 +18,8 @@ import React from 'react';
|
||||||
import { replaceableComponent } from "../../utils/replaceableComponent";
|
import { replaceableComponent } from "../../utils/replaceableComponent";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
title: JSX.Element;
|
title: React.ReactNode;
|
||||||
message: JSX.Element;
|
message: React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@replaceableComponent("structures.GenericErrorPage")
|
@replaceableComponent("structures.GenericErrorPage")
|
||||||
|
|
|
@ -29,7 +29,6 @@ import { IDialogProps } from "../views/dialogs/IDialogProps";
|
||||||
import BaseDialog from "../views/dialogs/BaseDialog";
|
import BaseDialog from "../views/dialogs/BaseDialog";
|
||||||
|
|
||||||
interface IProps extends IDialogProps {
|
interface IProps extends IDialogProps {
|
||||||
onFinished: () => void;
|
|
||||||
mxEvent: MatrixEvent; // the MatrixEvent associated with the context menu
|
mxEvent: MatrixEvent; // the MatrixEvent associated with the context menu
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue