remove useless strings, hide loader on eager finish

This commit is contained in:
Henry Jameson 2024-12-12 15:42:03 +02:00
commit 3cc9afc15f
5 changed files with 109 additions and 103 deletions

View file

@ -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])