From ebe7dc2075dee33d103f15652b94275fbe8f566b Mon Sep 17 00:00:00 2001 From: Ramin Tadayon Date: Wed, 8 Nov 2023 16:51:25 -0700 Subject: [PATCH] Fixes incorrect messaging on patch created notification --- src/plus/webviews/patchDetails/patchDetailsWebview.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plus/webviews/patchDetails/patchDetailsWebview.ts b/src/plus/webviews/patchDetails/patchDetailsWebview.ts index 6d28653..8efd1fa 100644 --- a/src/plus/webviews/patchDetails/patchDetailsWebview.ts +++ b/src/plus/webviews/patchDetails/patchDetailsWebview.ts @@ -381,15 +381,17 @@ export class PatchDetailsWebviewProvider async function showNotification() { const view = { title: 'View Patch' }; const copy = { title: 'Copy Link' }; + let copied = false; while (true) { const result = await window.showInformationMessage( - 'Cloud Patch successfully created \u2014 link copied to the clipboard', + `Cloud Patch successfully created${copied ? '\u2014 link copied to the clipboard' : ''}`, view, copy, ); if (result === copy) { void env.clipboard.writeText(draft.deepLinkUrl); + copied = true; continue; }