MCPcopy Index your code
hub / github.com/spicetify/cli / appendItems

Function appendItems

jsHelper/homeConfig.js:98–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96 }
97
98 function appendItems() {
99 const stick = [];
100 const low = [];
101 const normal = [];
102 for (const el of elem) {
103 if (statusDic[el.dataset.uri] === STICKY) stick.push(el);
104 else if (statusDic[el.dataset.uri] === LOWERED) low.push(el);
105 else normal.push(el);
106 }
107
108 localStorage.setItem(
109 "spicetify-home-config:stick",
110 stick.map((a) => a.dataset.uri)
111 );
112 localStorage.setItem(
113 "spicetify-home-config:low",
114 low.map((a) => a.dataset.uri)
115 );
116
117 elem = [...stick, ...normal, ...low];
118 main.append(...elem);
119 }
120
121 function onSwap(item, dir) {
122 container.remove();

Callers 2

onSwapFunction · 0.70
onChangeStatusFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected