Fix on app start theme set

This commit is contained in:
49lf
2024-08-07 20:10:22 -04:00
parent db9a654a3d
commit c653fc541f

View File

@ -105,7 +105,7 @@ export function useSetupEngineManager(
}, [immediateState]) }, [immediateState])
useEffect(() => { useEffect(() => {
engineCommandManager.settings.theme = settings.theme engineCommandManager.settings = settings
const handleResize = deferExecution(() => { const handleResize = deferExecution(() => {
const { width, height } = getDimensions( const { width, height } = getDimensions(
@ -195,13 +195,7 @@ export function useSetupEngineManager(
// Engine relies on many settings so we should rebind events when it changes // Engine relies on many settings so we should rebind events when it changes
// We have to list out the ones we care about because the settings object holds // We have to list out the ones we care about because the settings object holds
// non-settings too... // non-settings too...
}, [ }, [...Object.values(settings)])
settings.enableSSAO,
settings.highlightEdges,
settings.showScaleGrid,
settings.theme,
settings.pool,
])
} }
function getDimensions(streamWidth?: number, streamHeight?: number) { function getDimensions(streamWidth?: number, streamHeight?: number) {