1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-12-05 15:22:09 +03:00

Conform more of the codebase to strictNullChecks (#10666)

* Conform more of the codebase to `strictNullChecks`

* Iterate

* Iterate

* Iterate

* Iterate
This commit is contained in:
Michael Telatynski
2023-04-20 09:49:10 +01:00
committed by GitHub
parent 8867f1801e
commit 93b4ee654b
17 changed files with 126 additions and 114 deletions

View File

@@ -71,8 +71,8 @@ interface IState {
secondaryCall: MatrixCall;
// widget candidate to be displayed in the pip view.
persistentWidgetId: string;
persistentRoomId: string;
persistentWidgetId: string | null;
persistentRoomId: string | null;
showWidgetInPip: boolean;
}
@@ -225,7 +225,7 @@ class PipContainerInner extends React.Component<IProps, IState> {
if (callRoomId ?? this.state.persistentRoomId) {
dis.dispatch<ViewRoomPayload>({
action: Action.ViewRoom,
room_id: callRoomId ?? this.state.persistentRoomId,
room_id: callRoomId ?? this.state.persistentRoomId ?? undefined,
metricsTrigger: "WebFloatingCallWindow",
});
}
@@ -318,7 +318,7 @@ class PipContainerInner extends React.Component<IProps, IState> {
pipContent.push(({ onStartMoving }) => (
<WidgetPip
widgetId={this.state.persistentWidgetId}
room={MatrixClientPeg.get().getRoom(this.state.persistentRoomId)!}
room={MatrixClientPeg.get().getRoom(this.state.persistentRoomId ?? undefined)!}
viewingRoom={this.state.viewedRoomId === this.state.persistentRoomId}
onStartMoving={onStartMoving}
movePersistedElement={this.props.movePersistedElement}