You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
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:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user