Mark serialization methods priviate for now

This commit is contained in:
Jordan Eldredge 2018-09-24 17:05:01 -07:00
parent e20ec6686b
commit 7b9223544d
2 changed files with 6 additions and 6 deletions

View file

@ -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));
}

View file

@ -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);
}