Skip to content

Commit

Permalink
Close notification after a few seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
dfalbel committed Oct 30, 2024
1 parent eeac4b6 commit 3e71716
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,13 @@ const ResumeConnectionModalDialog = (props: PropsWithChildren<ResumeConnectionMo
}
await services.clipboardService.writeText(code);
props.renderer.dispose();
services.notificationService.info(localize(

const handle = services.connectionsService.notify(localize(
'positron.resumeConnectionModalDialog.codeCopied',
"Connection code copied to clipboard"
));
), Severity.Info);
// close the notification after 2 seconds
setTimeout(() => handle.close(), 2000);
};

const editHandler = async () => {
Expand Down

0 comments on commit 3e71716

Please sign in to comment.