diff --git a/js/indexdb.js b/js/indexdb.js index b7e7c465..b73a027b 100644 --- a/js/indexdb.js +++ b/js/indexdb.js @@ -25,11 +25,11 @@ export async function bindToIndexDB(webamp, clearState, useState) { } if (previousSerializedState != null) { - webamp.loadSerializedState(previousSerializedState); + webamp.__loadSerializedState(previousSerializedState); } async function persist() { - const serializedState = webamp.getSerializedState(); + const serializedState = webamp.__getSerializedState(); try { await localStore.set(LOCAL_STORAGE_KEY, serializedState); } catch (e) { @@ -37,5 +37,5 @@ export async function bindToIndexDB(webamp, clearState, useState) { } } - webamp.onStateChange(throttle(persist, 1000)); + webamp.__onStateChange(throttle(persist, 1000)); } diff --git a/js/webampLazy.js b/js/webampLazy.js index 84e45092..82806c40 100644 --- a/js/webampLazy.js +++ b/js/webampLazy.js @@ -240,15 +240,15 @@ class Winamp { return storeHas(this.store, state => !state.display.loading); } - loadSerializedState(serializedState) { + __loadSerializedState(serializedState) { this.store.dispatch(loadSerializedState(serializedState)); } - getSerializedState() { + __getSerializedState() { return Selectors.getSerlializedState(this.store.getState()); } - onStateChange(cb) { + __onStateChange(cb) { return this.store.subscribe(cb); }