fix: notification click uses current window ref, dismiss on settings auto-allow
- Click handler reads this.mainWindowRef instead of captured closure ref, so window recreation is handled correctly - reEvaluatePendingApprovals now calls dismissApprovalNotification when auto-allowing via settings change (was missing — stale notification stayed)
This commit is contained in:
parent
b3cc2f1421
commit
95b282577f
1 changed files with 6 additions and 3 deletions
|
|
@ -5407,9 +5407,11 @@ export class TeamProvisioningService {
|
|||
|
||||
notification.on('click', () => {
|
||||
cleanup();
|
||||
if (win && !win.isDestroyed()) {
|
||||
win.show();
|
||||
win.focus();
|
||||
// Use current mainWindowRef (not captured `win`) in case window was recreated
|
||||
const currentWin = this.mainWindowRef;
|
||||
if (currentWin && !currentWin.isDestroyed()) {
|
||||
currentWin.show();
|
||||
currentWin.focus();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -5582,6 +5584,7 @@ export class TeamProvisioningService {
|
|||
if (result.autoAllow) {
|
||||
this.clearApprovalTimeout(requestId);
|
||||
this.autoAllowControlRequest(run, requestId);
|
||||
this.dismissApprovalNotification(requestId);
|
||||
toRemove.push(requestId);
|
||||
this.emitToolApprovalEvent({
|
||||
autoResolved: true,
|
||||
|
|
|
|||
Loading…
Reference in a new issue