Conform more of the codebase to strictNullChecks
(#10731)
This commit is contained in:
parent
9f8113eabd
commit
1281c0746b
40 changed files with 147 additions and 119 deletions
|
@ -272,7 +272,8 @@ export default class LegacyCallHandler extends EventEmitter {
|
|||
return localNotificationsAreSilenced(cli);
|
||||
}
|
||||
|
||||
public silenceCall(callId: string): void {
|
||||
public silenceCall(callId?: string): void {
|
||||
if (!callId) return;
|
||||
this.silencedCalls.add(callId);
|
||||
this.emit(LegacyCallHandlerEvent.SilencedCallsChanged, this.silencedCalls);
|
||||
|
||||
|
@ -281,8 +282,8 @@ export default class LegacyCallHandler extends EventEmitter {
|
|||
this.pause(AudioID.Ring);
|
||||
}
|
||||
|
||||
public unSilenceCall(callId: string): void {
|
||||
if (this.isForcedSilent()) return;
|
||||
public unSilenceCall(callId?: string): void {
|
||||
if (!callId || this.isForcedSilent()) return;
|
||||
this.silencedCalls.delete(callId);
|
||||
this.emit(LegacyCallHandlerEvent.SilencedCallsChanged, this.silencedCalls);
|
||||
this.play(AudioID.Ring);
|
||||
|
@ -1182,8 +1183,9 @@ export default class LegacyCallHandler extends EventEmitter {
|
|||
// Prevent double clicking the call button
|
||||
const widget = WidgetStore.instance.getApps(roomId).find((app) => WidgetType.JITSI.matches(app.type));
|
||||
if (widget) {
|
||||
const room = client.getRoom(roomId);
|
||||
// If there already is a Jitsi widget, pin it
|
||||
WidgetLayoutStore.instance.moveToContainer(client.getRoom(roomId), widget, Container.Top);
|
||||
if (room) WidgetLayoutStore.instance.moveToContainer(room, widget, Container.Top);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue