mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-03-03 19:43:04 +08:00
fix(system-start): Do not continue when checkAvailability returns false
This commit is contained in:
parent
3c25434fc8
commit
12f4142d84
2 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue