Skip to content

Commit

Permalink
no auto-launch on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobweber committed Mar 11, 2020
1 parent 5ce5c8e commit 2e15d16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export interface ExportedPreferences {

export const exportPrefs = function(prefs: Preferences): ExportedPreferences {
const exported: ExportedPreferences = {};
if (!app.getLoginItemSettings) {
if (process.platform === 'linux') {
exported.launchStartup = null;
} else {
exported.launchStartup = prefs.launchStartup;
Expand Down Expand Up @@ -159,7 +159,7 @@ export const savePreferences = async function(data: Preferences = {}, oldData?:
}
}

if (app.getLoginItemSettings) {
if (process.platform !== 'linux' && app.getLoginItemSettings) {
const settings = app.getLoginItemSettings({});
if (settings.openAtLogin !== data.launchStartup) {
app.setLoginItemSettings({
Expand Down

0 comments on commit 2e15d16

Please sign in to comment.