post-revert fix + logging
This commit is contained in:
parent
f8fa540af7
commit
2e78975e4c
1 changed files with 3 additions and 4 deletions
|
@ -150,15 +150,14 @@ export const applyTheme = (
|
||||||
onEagerFinished () {
|
onEagerFinished () {
|
||||||
adoptStyleSheets([eagerStyles])
|
adoptStyleSheets([eagerStyles])
|
||||||
onEagerFinish()
|
onEagerFinish()
|
||||||
|
console.info('Eager part of theme finished, waiting for lazy part to finish to store cache')
|
||||||
},
|
},
|
||||||
onLazyFinished () {
|
onLazyFinished () {
|
||||||
adoptStyleSheets([eagerStyles, lazyStyles])
|
adoptStyleSheets([eagerStyles, lazyStyles])
|
||||||
const cache = { engineChecksum: getEngineChecksum(), data: [eagerStyles.rules, lazyStyles.rules] }
|
const cache = { engineChecksum: getEngineChecksum(), data: [eagerStyles.rules, lazyStyles.rules] }
|
||||||
onFinish(cache)
|
onFinish(cache)
|
||||||
const compress = (js) => {
|
localforage.setItem('pleromafe-theme-cache', cache)
|
||||||
return pako.deflate(JSON.stringify(js))
|
console.info('Theme cache stored')
|
||||||
}
|
|
||||||
localforage.setItem('pleromafe-theme-cache', compress(cache))
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
debug
|
debug
|
||||||
|
|
Loading…
Add table
Reference in a new issue