diff --git a/modern/src/store.ts b/modern/src/store.ts index 5fc38fde..634dc428 100644 --- a/modern/src/store.ts +++ b/modern/src/store.ts @@ -3,7 +3,12 @@ import { createStore, applyMiddleware } from "redux"; import { composeWithDevTools } from "redux-devtools-extension"; import thunk from "redux-thunk"; -const defaultState = { makiTree: null, volume: 127, xmlTree: null }; +const defaultState = { + makiTree: null, + volume: 127, + xmlTree: null, + skinLoaded: false, +}; function reducer( state: ModernAppState = defaultState, @@ -11,7 +16,7 @@ function reducer( ): ModernAppState { switch (action.type) { case "SET_MAKI_TREE": - return { ...state, makiTree: action.makiTree }; + return { ...state, makiTree: action.makiTree, skinLoaded: true }; case "SET_XML_TREE": return { ...state, xmlTree: action.xmlTree }; case "SET_VOLUME": diff --git a/modern/src/types.ts b/modern/src/types.ts index 8deee88a..e51b9884 100644 --- a/modern/src/types.ts +++ b/modern/src/types.ts @@ -11,6 +11,7 @@ export type ModernAppState = { makiTree: MakiTree | null; xmlTree: XmlTree | null; volume: number; + skinLoaded: boolean; }; export type ModernAction = | { type: "SET_MAKI_TREE"; makiTree: MakiTree }