diff --git a/src/electron/electron/main/index.ts b/src/electron/electron/main/index.ts index 84b51180..b08bb9d5 100644 --- a/src/electron/electron/main/index.ts +++ b/src/electron/electron/main/index.ts @@ -92,16 +92,21 @@ app.whenReady().then(async () => { const settings: Settings = await Settings.findOneBy({ onlyOneEntityShouldExist: 1 }); - if (settings.onboardingShown === false || !hasAccessibilityAndScreenRecordingPermission()) { + if ( + settings.onboardingShown === false || + !macOSHasAccessibilityAndScreenRecordingPermission() + ) { LOG.debug( - `Onboarding shown: ${settings.onboardingShown}, hasAccessibilityAndScreenRecordingPermission: ${hasAccessibilityAndScreenRecordingPermission()}, creating onboarding window...` + `Onboarding shown: ${settings.onboardingShown}, hasAccessibilityAndScreenRecordingPermission: ${macOSHasAccessibilityAndScreenRecordingPermission()}, creating onboarding window...` ); await windowService.createOnboardingWindow(); settings.onboardingShown = true; await settings.save(); - } else { + } + + if (!is.macOS || macOSHasAccessibilityAndScreenRecordingPermission()) { LOG.debug( - `Onboarding shown: ${settings.onboardingShown}, hasAccessibilityAndScreenRecordingPermission: ${hasAccessibilityAndScreenRecordingPermission()}, starting all trackers...` + `Onboarding shown: ${settings.onboardingShown}, hasAccessibilityAndScreenRecordingPermission: ${macOSHasAccessibilityAndScreenRecordingPermission()}, starting all trackers...` ); await trackers.startAllTrackers(); LOG.info(`Trackers started: ${trackers.getRunningTrackerNames().join(', ')}`); @@ -156,7 +161,7 @@ app.on('window-all-closed', () => { // } }); -function hasAccessibilityAndScreenRecordingPermission(): boolean { +function macOSHasAccessibilityAndScreenRecordingPermission(): boolean { if (!is.macOS) { return true; }