Construct modal widgets in the same way we do any other widget
Fixes https://github.com/vector-im/element-web/issues/15800
This commit is contained in:
parent
51f6205258
commit
fc820c4b1a
2 changed files with 3 additions and 2 deletions
|
@ -38,6 +38,7 @@ import {MatrixClientPeg} from "../../../MatrixClientPeg";
|
||||||
import RoomViewStore from "../../../stores/RoomViewStore";
|
import RoomViewStore from "../../../stores/RoomViewStore";
|
||||||
import {OwnProfileStore} from "../../../stores/OwnProfileStore";
|
import {OwnProfileStore} from "../../../stores/OwnProfileStore";
|
||||||
import { arrayFastClone } from "../../../utils/arrays";
|
import { arrayFastClone } from "../../../utils/arrays";
|
||||||
|
import { ElementWidget } from "../../../stores/widgets/StopGapWidget";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
widgetDefinition: IModalWidgetOpenRequestData;
|
widgetDefinition: IModalWidgetOpenRequestData;
|
||||||
|
@ -64,7 +65,7 @@ export default class ModalWidgetDialog extends React.PureComponent<IProps, IStat
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
this.widget = new Widget({
|
this.widget = new ElementWidget({
|
||||||
...this.props.widgetDefinition,
|
...this.props.widgetDefinition,
|
||||||
creatorUserId: MatrixClientPeg.get().getUserId(),
|
creatorUserId: MatrixClientPeg.get().getUserId(),
|
||||||
id: `modal_${this.props.sourceWidgetId}`,
|
id: `modal_${this.props.sourceWidgetId}`,
|
||||||
|
|
|
@ -68,7 +68,7 @@ interface IAppTileProps {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Don't use this because it's wrong
|
// TODO: Don't use this because it's wrong
|
||||||
class ElementWidget extends Widget {
|
export class ElementWidget extends Widget {
|
||||||
constructor(private rawDefinition: IWidget) {
|
constructor(private rawDefinition: IWidget) {
|
||||||
super(rawDefinition);
|
super(rawDefinition);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue