Skip to content

Commit 5c36ac3

Browse files
authored
Fix activity bar PR webview refresh (#8470)
* Fix activity bar PR webview refresh Fixes #8469 * Also finally * Copilot PR feedback
1 parent c6d7a1d commit 5c36ac3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/github/activityBarViewProvider.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,12 @@ export class PullRequestViewProvider extends WebviewViewBase implements vscode.W
203203
this._folderRepositoryManager.mergeQueueMethodForBranch(pullRequestModel.base.ref, pullRequestModel.remote.owner, pullRequestModel.remote.repositoryName),
204204
ensureEmojis(this._folderRepositoryManager.context),
205205
]);
206-
this._updatingPromise = updatingPromise;
206+
const clearingPromise = updatingPromise.finally(() => {
207+
if (this._updatingPromise === clearingPromise) {
208+
this._updatingPromise = undefined;
209+
}
210+
});
211+
this._updatingPromise = clearingPromise;
207212
const [pullRequest, repositoryAccess, timelineEvents, requestedReviewers, branchInfo, defaultBranch, currentUser, viewerCanEdit, hasReviewDraft, coAuthors, mergeQueueMethod] = await updatingPromise;
208213

209214
if (!pullRequest) {

0 commit comments

Comments
 (0)