diff --git a/internal_packages/onboarding/lib/main.coffee b/internal_packages/onboarding/lib/main.coffee index 9ae0eda13..dd9953f6b 100644 --- a/internal_packages/onboarding/lib/main.coffee +++ b/internal_packages/onboarding/lib/main.coffee @@ -14,8 +14,9 @@ module.exports = ComponentRegistry.register PageRouter, location: WorkspaceStore.Location.Center - startService = new SystemStartService() if (NylasEnv.config.get('nylas.accounts')?.length ? 0) is 0 + startService = new SystemStartService() startService.checkAvailability().then (available) => - startService.doesLaunchOnSystemStart().then (launchOnStart) => - startService.configureToLaunchOnSystemStart() unless launchOnStart + return unless available + startService.doesLaunchOnSystemStart().then (launchesOnStart) => + startService.configureToLaunchOnSystemStart() unless launchesOnStart diff --git a/spec/mailbox-perspective-spec.coffee b/spec/mailbox-perspective-spec.coffee index 9a4deb1a9..6f6aaa66f 100644 --- a/spec/mailbox-perspective-spec.coffee +++ b/spec/mailbox-perspective-spec.coffee @@ -71,7 +71,7 @@ describe 'MailboxPerspective', -> spyOn(@perspective, 'canArchiveThreads').andReturn true spyOn(TaskFactory, 'tasksForMovingToInbox') @perspective.removeThreads(@threads) - expect(TaskFactory.tasksForMovingToInbox).toHaveBeenCalledWith(@taskArgs) + expect(TaskFactory.tasksForMovingToInbox).toHaveBeenCalledWith({threads: @threads, fromPerspective: @perspective}) it 'removes categories if the current perspective does not correspond to archive or sent', -> spyOn(@perspective, 'isInbox').andReturn false @@ -88,4 +88,3 @@ describe 'MailboxPerspective', -> spyOn(@perspective, 'canArchiveThreads').andReturn false @perspective.removeThreads(@threads) expect(Actions.queueTasks).not.toHaveBeenCalled() -