Add launch-on login option

See [#5244][0].

[0]: https://github.com/signalapp/Signal-Desktop/pull/5244
This commit is contained in:
Jacob Kiesel 2021-05-11 15:59:21 -05:00 committed by Evan Hahn
parent b41dab2704
commit 75d54e7737
10 changed files with 44 additions and 2 deletions

View file

@ -68,6 +68,10 @@ try {
window.getServerPublicParams = () => config.serverPublicParams;
window.getSfuUrl = () => config.sfuUrl;
window.isBehindProxy = () => Boolean(config.proxyUrl);
window.getAutoLaunch = () => app.getLoginItemSettings().openAtLogin;
window.setAutoLaunch = value => {
app.setLoginItemSettings({ openAtLogin: Boolean(value) });
};
function setSystemTheme() {
window.systemTheme = nativeTheme.shouldUseDarkColors ? 'dark' : 'light';
@ -251,6 +255,9 @@ try {
installGetter('spell-check', 'getSpellCheck');
installSetter('spell-check', 'setSpellCheck');
installGetter('auto-launch', 'getAutoLaunch');
installSetter('auto-launch', 'setAutoLaunch');
installGetter('always-relay-calls', 'getAlwaysRelayCalls');
installSetter('always-relay-calls', 'setAlwaysRelayCalls');