mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-22 09:37:17 +00:00
Mark serialization methods priviate for now
This commit is contained in:
parent
e20ec6686b
commit
7b9223544d
2 changed files with 6 additions and 6 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue