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

Function appendItems

jsHelper/sidebarConfig.js:36–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34 }
35
36 function appendItems() {
37 const toShow = [];
38 const toHide = [];
39 const toStick = [];
40 for (const el of ordered) {
41 const [item, status] = el;
42 if (status === STICKY) {
43 appItems.append(item);
44 toStick.push(el);
45 } else if (status === SHOW) {
46 list.append(item);
47 toShow.push(el);
48 } else {
49 hiddenList.append(item);
50 toHide.push(el);
51 }
52 }
53 ordered = [...toStick, ...toShow, ...toHide];
54 }
55
56 function writeStorage() {
57 const array = ordered.map((a) => [a[0].dataset.id, a[1]]);

Callers 3

onSwapFunction · 0.70
onChangeStatusFunction · 0.70
InitSidebarXConfigFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected