Remove unused packages and fix invariant violation on AsyncStore onNotReady
(#9404)
* Remove traces of browser-request & mocha * Remove unused matrix-react-test-utils * Fix dispatcher invariant violation * Add null-guard * Improve types * Fix null-guard * Fix issue with authed users going directly to /#/login
This commit is contained in:
parent
28bd58e551
commit
1800cb8c71
8 changed files with 34 additions and 57 deletions
|
@ -154,9 +154,10 @@ export default class PipView extends React.Component<IProps, IState> {
|
|||
public componentWillUnmount() {
|
||||
LegacyCallHandler.instance.removeListener(LegacyCallHandlerEvent.CallChangeRoom, this.updateCalls);
|
||||
LegacyCallHandler.instance.removeListener(LegacyCallHandlerEvent.CallState, this.updateCalls);
|
||||
MatrixClientPeg.get().removeListener(CallEvent.RemoteHoldUnhold, this.onCallRemoteHold);
|
||||
const cli = MatrixClientPeg.get();
|
||||
cli?.removeListener(CallEvent.RemoteHoldUnhold, this.onCallRemoteHold);
|
||||
RoomViewStore.instance.removeListener(UPDATE_EVENT, this.onRoomViewStoreUpdate);
|
||||
const room = MatrixClientPeg.get().getRoom(this.state.viewedRoomId);
|
||||
const room = cli?.getRoom(this.state.viewedRoomId);
|
||||
if (room) {
|
||||
WidgetLayoutStore.instance.off(WidgetLayoutStore.emissionForRoom(room), this.updateCalls);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue