Skip to content

Commit 6e87002

Browse files
authored
Allow users to force refresh (#7951)
per standup discussion, we should also allow the user to force a refresh Also fixes #7916
1 parent 65b3316 commit 6e87002

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/view/prsTreeDataProvider.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export class PullRequestsTreeDataProvider extends Disposable implements vscode.T
6868
}));
6969
this._register(new PRStatusDecorationProvider(this.prsTreeModel, this._copilotManager));
7070
this._register(vscode.commands.registerCommand('pr.refreshList', _ => {
71+
this.prsTreeModel.forceClearCache();
7172
this.refreshAllQueryResults(true);
7273
}));
7374

src/view/prsTreeModel.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ export class PrsTreeModel extends Disposable {
148148
return this._queriedPullRequests.get(identifier);
149149
}
150150

151+
public forceClearCache() {
152+
this._cachedPRs.clear();
153+
this._onDidChangeData.fire();
154+
}
155+
151156
public clearCache(silent: boolean = false) {
152157
if (this._cachedPRs.size === 0) {
153158
return;

0 commit comments

Comments
 (0)