Conform to no-floating-promises (#27561)
This commit is contained in:
parent
9039e70990
commit
a0eb94704e
8 changed files with 31 additions and 31 deletions
|
@ -167,15 +167,14 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||
});
|
||||
});
|
||||
|
||||
window.electron.on("openDesktopCapturerSourcePicker", () => {
|
||||
window.electron.on("openDesktopCapturerSourcePicker", async () => {
|
||||
const { finished } = Modal.createDialog(DesktopCapturerSourcePicker);
|
||||
finished.then(([source]) => {
|
||||
// getDisplayMedia promise does not return if no dummy is passed here as source
|
||||
this.ipc.call("callDisplayMediaCallback", source ?? { id: "", name: "", thumbnailURL: "" });
|
||||
});
|
||||
const [source] = await finished;
|
||||
// getDisplayMedia promise does not return if no dummy is passed here as source
|
||||
await this.ipc.call("callDisplayMediaCallback", source ?? { id: "", name: "", thumbnailURL: "" });
|
||||
});
|
||||
|
||||
this.ipc.call("startSSOFlow", this.ssoID);
|
||||
void this.ipc.call("startSSOFlow", this.ssoID);
|
||||
|
||||
BreadcrumbsStore.instance.on(UPDATE_EVENT, this.onBreadcrumbsUpdate);
|
||||
}
|
||||
|
@ -195,7 +194,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||
),
|
||||
initial: getInitialLetter(r.name),
|
||||
}));
|
||||
this.ipc.call("breadcrumbs", rooms);
|
||||
void this.ipc.call("breadcrumbs", rooms);
|
||||
};
|
||||
|
||||
private onUpdateDownloaded = async (ev: Event, { releaseNotes, releaseName }: SquirrelUpdate): Promise<void> => {
|
||||
|
@ -261,7 +260,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||
const handler = notification.onclick as Function;
|
||||
notification.onclick = (): void => {
|
||||
handler?.();
|
||||
this.ipc.call("focusWindow");
|
||||
void this.ipc.call("focusWindow");
|
||||
};
|
||||
|
||||
return notification;
|
||||
|
@ -399,7 +398,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||
}
|
||||
|
||||
public navigateForwardBack(back: boolean): void {
|
||||
this.ipc.call(back ? "navigateBack" : "navigateForward");
|
||||
void this.ipc.call(back ? "navigateBack" : "navigateForward");
|
||||
}
|
||||
|
||||
public overrideBrowserShortcuts(): boolean {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue