@@ -355,9 +355,9 @@ export class PrsTreeModel extends Disposable {
355355 try {
356356 let maxKnownPR : number | undefined ;
357357 const cache = this . getFolderCache ( folderRepoManager ) ;
358+ const cachedPRs = cache . get ( query ) ! ;
358359 if ( ! fetchNextPage && cache . has ( query ) ) {
359360 const shouldRefresh = await this . _testIfRefreshNeeded ( cache . get ( query ) ! , query , folderRepoManager ) ;
360- const cachedPRs = cache . get ( query ) ! ;
361361 maxKnownPR = cachedPRs . maxKnownPR ;
362362 if ( ! shouldRefresh ) {
363363 cachedPRs . clearRequested = false ;
@@ -377,6 +377,9 @@ export class PrsTreeModel extends Disposable {
377377 { fetchNextPage, fetchOnePagePerRepo } ,
378378 query ,
379379 ) ;
380+ if ( fetchNextPage ) {
381+ prs . items = cachedPRs ?. items . items . concat ( prs . items ) ?? prs . items ;
382+ }
380383 cache . set ( query , { clearRequested : false , items : prs , maxKnownPR } ) ;
381384 prs . items . forEach ( pr => this . _allCachedPRs . add ( pr ) ) ;
382385
@@ -404,6 +407,9 @@ export class PrsTreeModel extends Disposable {
404407 PRType . All ,
405408 { fetchNextPage }
406409 ) ;
410+ if ( fetchNextPage ) {
411+ prs . items = allCache ?. items . items . concat ( prs . items ) ?? prs . items ;
412+ }
407413 cache . set ( PRType . All , { clearRequested : false , items : prs , maxKnownPR : undefined } ) ;
408414 prs . items . forEach ( pr => this . _allCachedPRs . add ( pr ) ) ;
409415
0 commit comments