From bc5943ba8e747dd8375069c8a1a53b9da886a86d Mon Sep 17 00:00:00 2001 From: Mattias Granlund Date: Tue, 19 Nov 2024 21:08:24 +0000 Subject: [PATCH] Do not show "reopen pr" button if merged --- apps/desktop/src/lib/pr/PullRequestCard.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/lib/pr/PullRequestCard.svelte b/apps/desktop/src/lib/pr/PullRequestCard.svelte index b656439fcb..7f482190ca 100644 --- a/apps/desktop/src/lib/pr/PullRequestCard.svelte +++ b/apps/desktop/src/lib/pr/PullRequestCard.svelte @@ -11,6 +11,7 @@ import { getForgePrService } from '$lib/forge/interface/forgePrService'; import { showError } from '$lib/notifications/toasts'; import { copyToClipboard } from '$lib/utils/clipboard'; + import { sleep } from '$lib/utils/sleep'; import { openExternalUrl } from '$lib/utils/url'; import { VirtualBranchService } from '$lib/vbranches/virtualBranch'; import { getContext, getContextStore } from '@gitbutler/shared/context'; @@ -298,6 +299,7 @@ const method = e.detail.method; try { await $prService?.merge(method, pr.number); + await sleep(500); // Expect forge to sometimes be slow. await baseBranchService.fetchFromRemotes(); await Promise.all([ prMonitor?.refresh(), @@ -313,7 +315,7 @@ } }} /> - {:else} + {:else if !pr.merged}