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}