Get rid of electron.remote

This commit is contained in:
Fedor Indutny 2021-10-27 10:54:16 -07:00 committed by GitHub
parent 246583d274
commit 76d8b5e375
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 563 additions and 591 deletions

View file

@ -114,7 +114,7 @@ export type IPCEventsCallbacksType = {
type ValuesWithGetters = Omit<
IPCEventsValuesType,
// Optional
'mediaPermissions' | 'mediaCameraPermissions'
'mediaPermissions' | 'mediaCameraPermissions' | 'autoLaunch'
>;
type ValuesWithSetters = Omit<
@ -146,6 +146,7 @@ export type IPCEventsGettersType = {
} & {
getMediaPermissions?: () => Promise<boolean>;
getMediaCameraPermissions?: () => Promise<boolean>;
getAutoLaunch?: () => Promise<boolean>;
};
export type IPCEventsSettersType = {
@ -330,7 +331,7 @@ export function createIPCEvents(
getAutoLaunch: () => window.getAutoLaunch(),
setAutoLaunch: async (value: boolean) => {
window.setAutoLaunch(value);
return window.setAutoLaunch(value);
},
isPhoneNumberSharingEnabled: () => isPhoneNumberSharingEnabled(),