MCPcopy
hub / github.com/stemdeckapp/stemdeck / destroySections

Function destroySections

static/js/sections.js:42–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40}
41
42export function destroySections() {
43 // Flush any pending debounced save before clearing state so switching tracks
44 // never drops unsaved sections. _save() serializes _sections synchronously
45 // (JSON.stringify runs before the first await) so it's safe to clear state
46 // after calling it.
47 if (_saveTimer !== null) {
48 clearTimeout(_saveTimer);
49 _saveTimer = null;
50 _save();
51 }
52 _hideSaveIndicator();
53 _trackId = null;
54 _sections = [];
55 _duration = 0;
56 if (_container) _container.innerHTML = "";
57 _container = null;
58}
59
60// ─── Rendering ────────────────────────────────────────────
61

Callers 1

destroyPlayerFunction · 0.90

Calls 2

_hideSaveIndicatorFunction · 0.85
_saveFunction · 0.70

Tested by

no test coverage detected