Skip to content

Commit d669f28

Browse files
authored
PR View: Over Caching PRs (#7840)
Fixes #7828
1 parent 79e3f6a commit d669f28

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/view/prsTreeModel.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,9 @@ export class PrsTreeModel extends Disposable {
360360

361361
async getAllPullRequests(folderRepoManager: FolderRepositoryManager, fetchNextPage: boolean, update?: boolean): Promise<ItemsResponseResult<PullRequestModel>> {
362362
const cache = this.getFolderCache(folderRepoManager);
363-
if (!update && cache.has(PRType.All) && !fetchNextPage) {
364-
return cache.get(PRType.All)!.items;
363+
const allCache = cache.get(PRType.All);
364+
if (!update && allCache && !allCache.clearRequested && !fetchNextPage) {
365+
return allCache.items;
365366
}
366367

367368
const prs = await folderRepoManager.getPullRequests(

0 commit comments

Comments
 (0)