mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-22 15:15:12 +08:00
fix(install-package): Point to the examples directory by default
This commit is contained in:
parent
c20599d471
commit
05d68b1a62
3 changed files with 13 additions and 2 deletions
|
@ -7,7 +7,12 @@ class InitialPackagesStore extends NylasStore
|
|||
constructor: ->
|
||||
@starterPackages = []
|
||||
{resourcePath} = atom.getLoadSettings()
|
||||
@starterPackagesPath = path.join(resourcePath, "examples")
|
||||
|
||||
if resourcePath.indexOf('app.asar') != -1
|
||||
@starterPackagesPath = path.join(resourcePath,'..', 'app.asar.unpacked', 'examples')
|
||||
else
|
||||
@starterPackagesPath = path.join(resourcePath, "examples")
|
||||
|
||||
@lastError = null
|
||||
@loadStarterPackages()
|
||||
|
||||
|
|
|
@ -162,8 +162,15 @@ PackagesStore = Reflux.createStore
|
|||
@_apm.update(pkg, pkg.newerVersion)
|
||||
|
||||
_onInstallPackage: ->
|
||||
{resourcePath} = atom.getLoadSettings()
|
||||
if resourcePath.indexOf('app.asar') != -1
|
||||
starterPackagesPath = path.join(resourcePath,'..', 'app.asar.unpacked', 'examples')
|
||||
else
|
||||
starterPackagesPath = path.join(resourcePath, "examples")
|
||||
|
||||
dialog.showOpenDialog
|
||||
title: "Choose a Package Directory"
|
||||
defaultPath: starterPackagesPath
|
||||
properties: ['openDirectory']
|
||||
, (filenames) =>
|
||||
return if not filenames or filenames.length is 0
|
||||
|
|
|
@ -163,7 +163,6 @@ class AccountStore
|
|||
unread: threadUnread
|
||||
snippet: threadMessages[0].snippet
|
||||
starred: threadMessages[0].starred
|
||||
labels: threadMessages[0].labels
|
||||
)
|
||||
messages = messages.concat(threadMessages)
|
||||
threads.push(thread)
|
||||
|
|
Loading…
Reference in a new issue