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:
@@ -217,7 +217,7 @@ type
|
||||
// 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).
|
||||
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
|
||||
// focus to when we go back to the tray. Ignores our own and shell windows.
|
||||
procedure CaptureForegroundOwner;
|
||||
@@ -835,7 +835,7 @@ begin
|
||||
end;
|
||||
|
||||
procedure TPMBridge.MinimizeToTray(AClearClipboard: Boolean = True;
|
||||
AReturnForeground: Boolean = True);
|
||||
AReturnForeground: Boolean = True; ANotify: Boolean = True);
|
||||
var
|
||||
LFormHwnd, LAppHwnd: HWND;
|
||||
begin
|
||||
@@ -893,7 +893,9 @@ begin
|
||||
// 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
|
||||
// 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
|
||||
ShowFirstTimeBalloon;
|
||||
FBalloonShown := True;
|
||||
|
||||
@@ -1399,7 +1399,7 @@ begin
|
||||
else if ACmd = 'qr/screen' then
|
||||
begin
|
||||
LogLine('qr/screen: scanning');
|
||||
FBridge.MinimizeToTray(False, False);
|
||||
FBridge.MinimizeToTray(False, False, False);
|
||||
TThread.CreateAnonymousThread(
|
||||
procedure
|
||||
var
|
||||
|
||||
Reference in New Issue
Block a user