mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-12-27 02:23:28 +08:00
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:
parent
3df5aeafcc
commit
e5521161b7
3 changed files with 1 additions and 8 deletions
|
@ -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")
|
||||
|
|
|
@ -6,7 +6,5 @@ export default class FileListCache {
|
|||
constructor() {
|
||||
this.imageData = "{}" // A JSON stringified hash
|
||||
this.packagePaths = []
|
||||
this.lessCacheImportPaths = []
|
||||
this.lessCacheImportedFiles = []
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue