Everything written this session that has not been through the device: rounds 43 to 48 (each patch adversarially verified, 43's transient-notice expectation fixed), a partial round 49, the pipeline scripts, the Android Auto design and the icon comparison mock. Also the two harness changes that were never A/B'd — adaptive waits, which may only shorten a declared wait and never lengthen it, and a ship that runs the mock walk and the deploy at the same time. The A/B and its 255-step baseline are in handoff/tools; main stays at what the phone has actually walked.
23 lines
1.2 KiB
Plaintext
23 lines
1.2 KiB
Plaintext
|
|
/* ── the queue, dragged ───────────────────────────────────────────
|
|
The same gesture the playlist page has (./reorder.js). Press and
|
|
release without moving and the row's sheet opens exactly as the long
|
|
press always opened it — which matters more here than anywhere: a
|
|
queue row has no ⋯, so that sheet is the only door to Play now, Move
|
|
to next and Remove from queue. */
|
|
let qiAt = -1;
|
|
function queueLift() { qiAt = player.qi; }
|
|
function queueDrop(from, to) {
|
|
/* a track boundary crossed mid-drag moves the whole rendered
|
|
window, and these are absolute indices: they would address the
|
|
wrong rows. Drop nothing rather than the wrong thing. */
|
|
if (player.qi !== qiAt) return;
|
|
moveInQueue(qiAt + 1 + from, qiAt + 1 + to);
|
|
}
|
|
function queueHold(k) {
|
|
const i = player.qi + 1 + k;
|
|
const e = player.queue[i];
|
|
if (e) openHalf("track", { album: e.album, track: e.t, queueIndex: i });
|
|
}
|
|
const queueDrag = { enabled: true, rowSel: ".row", scrollSel: ".np-face", onLift: queueLift, onDrop: queueDrop, onHold: queueHold };
|