mirror of
https://github.com/captbaritone/webamp.git
synced 2026-08-01 22:45:18 +00:00
Move private methods to the bottom
This commit is contained in:
parent
d90721ac0d
commit
1f79527f23
1 changed files with 20 additions and 20 deletions
|
|
@ -267,13 +267,6 @@ class Webamp {
|
|||
this.store.dispatch(Actions.previous());
|
||||
}
|
||||
|
||||
_bufferTracks(tracks: Track[]): void {
|
||||
const nextIndex = Selectors.getTrackCount(this.store.getState());
|
||||
this.store.dispatch(
|
||||
Actions.loadMediaFiles(tracks, LOAD_STYLE.BUFFER, nextIndex)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an array of `Track`s to the end of the playlist.
|
||||
*/
|
||||
|
|
@ -400,19 +393,6 @@ class Webamp {
|
|||
return;
|
||||
}
|
||||
|
||||
__loadSerializedState(serializedState: SerializedStateV1): void {
|
||||
this.store.dispatch(Actions.loadSerializedState(serializedState));
|
||||
}
|
||||
|
||||
__getSerializedState() {
|
||||
return Selectors.getSerlializedState(this.store.getState());
|
||||
}
|
||||
|
||||
__onStateChange(cb: () => void): () => void {
|
||||
// TODO #leak
|
||||
return this.store.subscribe(cb);
|
||||
}
|
||||
|
||||
/**
|
||||
* Webamp will wait until it has fetched the skin and fully parsed it and then render itself.
|
||||
*
|
||||
|
|
@ -462,6 +442,26 @@ class Webamp {
|
|||
this._actionEmitter.dispose();
|
||||
this._disposable.dispose();
|
||||
}
|
||||
|
||||
__loadSerializedState(serializedState: SerializedStateV1): void {
|
||||
this.store.dispatch(Actions.loadSerializedState(serializedState));
|
||||
}
|
||||
|
||||
__getSerializedState() {
|
||||
return Selectors.getSerlializedState(this.store.getState());
|
||||
}
|
||||
|
||||
__onStateChange(cb: () => void): () => void {
|
||||
// TODO #leak
|
||||
return this.store.subscribe(cb);
|
||||
}
|
||||
|
||||
_bufferTracks(tracks: Track[]): void {
|
||||
const nextIndex = Selectors.getTrackCount(this.store.getState());
|
||||
this.store.dispatch(
|
||||
Actions.loadMediaFiles(tracks, LOAD_STYLE.BUFFER, nextIndex)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Return a promise that resolves when the store matches a predicate.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue