From fb5d2f35a20da2f5e02457e2690fbb80c6c8043a Mon Sep 17 00:00:00 2001 From: r-zakarya <82443831+r-zakarya@users.noreply.github.com> Date: Thu, 17 Sep 2026 18:53:14 +0100 Subject: [PATCH] fix(apk): le lien du QR est accepte meme precede d'un caractere invisible Co-Authored-By: Claude Opus 5 --- mainApk.pas | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mainApk.pas b/mainApk.pas index 8947852..2ff66e1 100644 --- a/mainApk.pas +++ b/mainApk.pas @@ -3424,11 +3424,16 @@ begin IfThen(LDiag <> '', LDiag, IfThen(LText = '', 'nothing found', 'read ' + IntToStr(Length(LText)) + ' chars'))])); if (not FScanning) or (LText = '') then Exit; - if StartsText('pmserver://sync?', LText) then + // CHERCHE, NE COMPARE PAS LE DEBUT : le texte decode est arrive + // avec un caractere invisible en tete (104 lus pour 103 emis), + // et le lien etait ignore alors qu'il etait lu. + if Pos('pmserver://sync?', LText) > 0 then begin StopScan; - ApplySyncLink(LText); - end; + ApplySyncLink(Trim(Copy(LText, Pos('pmserver://sync?', LText), MaxInt))); + end + else + Log('QR scan: not a sync link, first char code ' + IntToStr(Ord(LText[1]))); end); end).Start; end);