Use namespaced Utils for webamplazy

This commit is contained in:
Jordan Eldredge 2018-09-22 17:59:07 -07:00
parent 3049350701
commit 949a2bc771

View file

@ -22,7 +22,7 @@ import {
ensureWindowsAreOnScreen
} from "./actionCreators";
import { LOAD_STYLE } from "./constants";
import { uniqueId, objectMap, objectForEach } from "./utils";
import * as Utils from "./utils";
import {
SET_AVAILABLE_SKINS,
@ -102,7 +102,7 @@ class Winamp {
this.genWindows = [];
if (__extraWindows) {
this.genWindows = __extraWindows.map(genWindow => ({
id: genWindow.id || `${genWindow.title}-${uniqueId()}`,
id: genWindow.id || `${genWindow.title}-${Utils.uniqueId()}`,
...genWindow
}));
@ -155,13 +155,13 @@ class Winamp {
const layout = options.__initialWindowLayout;
if (layout != null) {
objectForEach(layout, (w, windowId) => {
Utils.objectForEach(layout, (w, windowId) => {
if (w.size != null) {
this.store.dispatch(setWindowSize(windowId, w.size));
}
});
this.store.dispatch(
updateWindowPositions(objectMap(layout, w => w.position), true)
updateWindowPositions(Utils.objectMap(layout, w => w.position), true)
);
}