Improve typing around event emitter handlers (#7816)
This commit is contained in:
committed by
GitHub
parent
213b32bf14
commit
7fa01ffb06
@@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
import React from 'react';
|
||||
import { MatrixEvent } from 'matrix-js-sdk/src/models/event';
|
||||
import { IClientWellKnown, MatrixClient } from 'matrix-js-sdk/src/client';
|
||||
import { ClientEvent, IClientWellKnown, MatrixClient } from 'matrix-js-sdk/src/client';
|
||||
|
||||
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
||||
import BaseDialog from "../dialogs/BaseDialog";
|
||||
@@ -53,7 +53,7 @@ export default class LocationViewDialog extends React.Component<IProps, IState>
|
||||
return;
|
||||
}
|
||||
|
||||
this.props.matrixClient.on("WellKnown.client", this.updateStyleUrl);
|
||||
this.props.matrixClient.on(ClientEvent.ClientWellKnown, this.updateStyleUrl);
|
||||
|
||||
this.map = createMap(
|
||||
this.coords,
|
||||
@@ -65,7 +65,7 @@ export default class LocationViewDialog extends React.Component<IProps, IState>
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.props.matrixClient.off("WellKnown.client", this.updateStyleUrl);
|
||||
this.props.matrixClient.off(ClientEvent.ClientWellKnown, this.updateStyleUrl);
|
||||
}
|
||||
|
||||
private updateStyleUrl = (clientWellKnown: IClientWellKnown) => {
|
||||
|
||||
Reference in New Issue
Block a user