Phyks (Lucas Verney)
d8a7d4f66a
Full rework of webplayer. Webplayer is back to its previous working state, and ready for further improvements.
23 lines
741 B
JavaScript
23 lines
741 B
JavaScript
/**
|
|
* This file defines entities storage models.
|
|
*/
|
|
|
|
// NPM imports
|
|
import Immutable from "immutable";
|
|
|
|
/** Record to store the shared entities. */
|
|
export const stateRecord = new Immutable.Record({
|
|
isFetching: false, /** Whether API fetching is in progress */
|
|
error: null, /** An error string */
|
|
refCounts: new Immutable.Map({
|
|
album: new Immutable.Map(),
|
|
artist: new Immutable.Map(),
|
|
song: new Immutable.Map(),
|
|
}), /** Map of id => reference count for each object type (garbage collection) */
|
|
entities: new Immutable.Map({
|
|
album: new Immutable.Map(),
|
|
artist: new Immutable.Map(),
|
|
song: new Immutable.Map(),
|
|
}), /** Map of id => entity for each object type */
|
|
});
|