fix(totp): pas de notification 'toujours dans le tray' pendant le scan du QR

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
r-zakarya
2026-09-18 22:40:00 +01:00
parent e3904236a7
commit dcb1ac63ce
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -217,7 +217,7 @@ type
// it before we came out of the tray. False for callers that already decided // it before we came out of the tray. False for callers that already decided
// who should be focused (post-autofill hands it to the filled window). // who should be focused (post-autofill hands it to the filled window).
procedure MinimizeToTray(AClearClipboard: Boolean = True; procedure MinimizeToTray(AClearClipboard: Boolean = True;
AReturnForeground: Boolean = True); AReturnForeground: Boolean = True; ANotify: Boolean = True);
// Record the application currently in the foreground as the one to restore // Record the application currently in the foreground as the one to restore
// focus to when we go back to the tray. Ignores our own and shell windows. // focus to when we go back to the tray. Ignores our own and shell windows.
procedure CaptureForegroundOwner; procedure CaptureForegroundOwner;
@@ -835,7 +835,7 @@ begin
end; end;
procedure TPMBridge.MinimizeToTray(AClearClipboard: Boolean = True; procedure TPMBridge.MinimizeToTray(AClearClipboard: Boolean = True;
AReturnForeground: Boolean = True); AReturnForeground: Boolean = True; ANotify: Boolean = True);
var var
LFormHwnd, LAppHwnd: HWND; LFormHwnd, LAppHwnd: HWND;
begin begin
@@ -893,7 +893,9 @@ begin
// 3. First-time only: pop a balloon notification so the user knows the // 3. First-time only: pop a balloon notification so the user knows the
// app is still running in the tray (and didn't crash). Skipped when // app is still running in the tray (and didn't crash). Skipped when
// the user opted out via Settings. // the user opted out via Settings.
if (not FBalloonShown) and FShowNotifications then // ANotify=False : absence de quelques centaines de ms (scan du QR), la
// fenetre revient seule - l'annonce "toujours dans le tray" serait fausse.
if ANotify and (not FBalloonShown) and FShowNotifications then
begin begin
ShowFirstTimeBalloon; ShowFirstTimeBalloon;
FBalloonShown := True; FBalloonShown := True;
+1 -1
View File
@@ -1399,7 +1399,7 @@ begin
else if ACmd = 'qr/screen' then else if ACmd = 'qr/screen' then
begin begin
LogLine('qr/screen: scanning'); LogLine('qr/screen: scanning');
FBridge.MinimizeToTray(False, False); FBridge.MinimizeToTray(False, False, False);
TThread.CreateAnonymousThread( TThread.CreateAnonymousThread(
procedure procedure
var var