Skip to content

Commit ffb440c

Browse files
authored
Fix constant refresh of PRs view (#7236)
1 parent 8333496 commit ffb440c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/view/prsTreeDataProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ export class PullRequestsTreeDataProvider extends Disposable implements vscode.T
292292

293293
refresh(node?: TreeNode, reset?: boolean): void {
294294
if (reset) {
295-
this.prsTreeModel.clearCache();
295+
this.prsTreeModel.clearCache(true);
296296
}
297297
return node ? this._onDidChangeTreeData.fire(node) : this._onDidChangeTreeData.fire();
298298
}

src/view/prsTreeModel.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,11 @@ export class PrsTreeModel extends Disposable {
118118
return this._queriedPullRequests.get(identifier);
119119
}
120120

121-
public clearCache() {
121+
public clearCache(silent: boolean = false) {
122122
this._cachedPRs.clear();
123-
this._onDidChangeData.fire();
123+
if (!silent) {
124+
this._onDidChangeData.fire();
125+
}
124126
}
125127

126128
public clearRepo(folderRepoManager: FolderRepositoryManager) {

0 commit comments

Comments
 (0)