fix(android): every refusal hands the screen back
Reported together, and the second explains the first: Cancel did nothing because Save disables it and nothing re-enabled it - a disabled button fires no click. And the screen never came back because the entry guards (busy, no uuid, no sync password) returned with a toast and nothing else, leaving the editor open with every control dead. A cul-de-sac with no way out but killing the app. Each guard now calls PM.editDone, which redraws the row from the last detail received. The page can leave edit mode without asking Delphi for anything, which is what it needed to recover from a refusal that never reached the network. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+11
-1
@@ -557,15 +557,25 @@ procedure TForm8.SaveEntryPassword(const ANewValue: string);
|
||||
var
|
||||
LUuid, LTitle: string;
|
||||
begin
|
||||
if FBusy then Exit;
|
||||
// CHAQUE REFUS REND LA MAIN A LA PAGE. Ces gardes se contentaient d'un
|
||||
// message : l'editeur restait ouvert avec ses boutons desactives, donc
|
||||
// Cancel lui-meme ne repondait plus - un cul-de-sac dont rien ne sortait.
|
||||
if FBusy then
|
||||
begin
|
||||
WebCall('PM.toast("Busy - wait for the current operation")');
|
||||
WebCall('PM.editDone()');
|
||||
Exit;
|
||||
end;
|
||||
if FCurrent.Uuid = '' then
|
||||
begin
|
||||
WebCall('PM.toast("This entry has no uuid - cannot be updated")');
|
||||
WebCall('PM.editDone()');
|
||||
Exit;
|
||||
end;
|
||||
if FSyncPwd = '' then
|
||||
begin
|
||||
WebCall('PM.toast("Sync password missing - open the vault first")');
|
||||
WebCall('PM.editDone()');
|
||||
Exit;
|
||||
end;
|
||||
LUuid := FCurrent.Uuid;
|
||||
|
||||
Reference in New Issue
Block a user