fix(android): Cancel works, because lastDetail is now written

It was introduced with two readers and no writer. Cancel called
renderDetail(null), which threw on d.rows and did nothing at all - and
editDone, which uses it to hand control back after a refusal, was dead the
same way. That is why the successive fixes for "Cancel does not respond"
changed nothing: they all ended in the same silent throw.

Assigned where a detail is drawn, which is the one place that knows it.
This commit is contained in:
r-zakarya
2026-08-21 16:38:26 +01:00
parent 5522089939
commit 795f07fd8a
+8
View File
@@ -586,9 +586,17 @@ document.getElementById('qx').addEventListener('click', function () {
var detailRows = [];
// Le dernier detail recu, pour redessiner la ligne apres une annulation sans
// avoir a le redemander a Delphi.
//
// IL FAUT L'ECRIRE. Il a ete introduit avec ses deux lecteurs et aucun
// ecrivain : Cancel appelait donc renderDetail(null), qui levait sur d.rows et
// ne faisait rien du tout. editDone, qui s'en sert aussi pour rendre la main
// apres un refus, etait mort de la meme facon - ce qui explique pourquoi les
// corrections successives de "Cancel ne repond pas" n'y changeaient rien.
var lastDetail = null;
function renderDetail(d) {
if (!d) return;
lastDetail = d;
detailRows = d.rows || [];
document.getElementById('dtitle').textContent = d.title || '';
var html = '', i;