remove useless strings, hide loader on eager finish
This commit is contained in:
parent
179fb9e527
commit
3cc9afc15f
5 changed files with 109 additions and 103 deletions
|
|
@ -118,7 +118,7 @@ export const tryLoadCache = async () => {
|
|||
}
|
||||
}
|
||||
|
||||
export const applyTheme = (input, onFinish = (data) => {}, debug) => {
|
||||
export const applyTheme = (input, onEagerFinish = data => {}, onFinish = data => {}, debug) => {
|
||||
const eagerStyles = createStyleSheet(EAGER_STYLE_ID)
|
||||
const lazyStyles = createStyleSheet(LAZY_STYLE_ID)
|
||||
|
||||
|
|
@ -148,6 +148,7 @@ export const applyTheme = (input, onFinish = (data) => {}, debug) => {
|
|||
},
|
||||
onEagerFinished () {
|
||||
adoptStyleSheets([eagerStyles])
|
||||
onEagerFinish()
|
||||
},
|
||||
onLazyFinished () {
|
||||
adoptStyleSheets([eagerStyles, lazyStyles])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue