fix(themes): Properly set theme on the hot window

- First composer window you open after changing the theme will now have
the correct theme
This commit is contained in:
Juan Tejada 2016-06-09 14:11:37 -07:00
parent 3df5aeafcc
commit e5521161b7
3 changed files with 1 additions and 8 deletions

View file

@ -12,8 +12,6 @@ describe "ThemeManager", ->
configDirPath = NylasEnv.getConfigDirPath()
beforeEach ->
cache = NylasEnv.fileListCache()
cache.lessCacheImportPaths = null
spyOn(console, "log")
spyOn(console, "warn")
spyOn(console, "error")

View file

@ -6,7 +6,5 @@ export default class FileListCache {
constructor() {
this.imageData = "{}" // A JSON stringified hash
this.packagePaths = []
this.lessCacheImportPaths = []
this.lessCacheImportedFiles = []
}
}

View file

@ -27,12 +27,9 @@ class LessCompileCache
# and every importPath. If we already have the imports, then load it
# from our backend FileListCache.
setImportPaths: (importPaths=[]) ->
fileCache = NylasEnv.fileListCache()
fileCacheImportPaths = fileCache.lessCacheImportPaths ? []
fullImportPaths = importPaths.concat(@lessSearchPaths)
if not _.isEqual(fullImportPaths, fileCacheImportPaths)
if not _.isEqual(fullImportPaths, @cache.importPaths)
@cache.setImportPaths(fullImportPaths)
fileCache.lessCacheImportPaths = fullImportPaths
read: (stylesheetPath) ->
@cache.readFileSync(stylesheetPath)