Preload media devices to avoid later delay
Co-authored-by: ayumi yu <ayumi@signal.org>
This commit is contained in:
parent
6d216a3eca
commit
59a4f237fd
5 changed files with 43 additions and 0 deletions
|
@ -2653,6 +2653,15 @@ async function ensureFilePermissions(onlyFiles?: Array<string>) {
|
|||
getLogger().info(`Finish ensuring permissions in ${Date.now() - start}ms`);
|
||||
}
|
||||
|
||||
ipc.handle('get-media-access-status', async (_event, value) => {
|
||||
// This function is not supported on Linux
|
||||
if (!systemPreferences.getMediaAccessStatus) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return systemPreferences.getMediaAccessStatus(value);
|
||||
});
|
||||
|
||||
ipc.handle('get-auto-launch', async () => {
|
||||
return app.getLoginItemSettings(await getDefaultLoginItemSettings())
|
||||
.openAtLogin;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue