This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -98,8 +98,7 @@ IObservable<IEnumerable<AccountCacheItem>> GetUser()
9898 {
9999 return hostCache . GetAndRefreshObject ( "user" ,
100100 ( ) => apiClient . GetUser ( ) . Select ( AccountCacheItem . Create ) , TimeSpan . FromMinutes ( 5 ) , TimeSpan . FromDays ( 7 ) )
101- . PublishLast ( )
102- . RefCount ( )
101+ . TakeLast ( 1 )
103102 . ToList ( ) ;
104103 }
105104
@@ -126,12 +125,8 @@ IObservable<IEnumerable<AccountCacheItem>> GetUserOrganizations()
126125 public IObservable < IReadOnlyList < IRepositoryModel > > GetRepositories ( )
127126 {
128127 return GetUserRepositories ( RepositoryType . Owner )
129- . PublishLast ( )
130- . RefCount ( )
131- . Concat ( GetUserRepositories ( RepositoryType . Member )
132- . PublishLast ( )
133- . RefCount ( )
134- )
128+ . TakeLast ( 1 )
129+ . Concat ( GetUserRepositories ( RepositoryType . Member ) . TakeLast ( 1 ) )
135130 . Concat ( GetAllRepositoriesForAllOrganizations ( ) ) ;
136131 }
137132
@@ -207,10 +202,7 @@ IObservable<IReadOnlyList<IRepositoryModel>> GetAllRepositoriesForAllOrganizatio
207202 {
208203 return GetUserOrganizations ( )
209204 . SelectMany ( org => org . ToObservable ( ) )
210- . SelectMany ( org => GetOrganizationRepositories ( org . Login )
211- . PublishLast ( )
212- . RefCount ( )
213- ) ;
205+ . SelectMany ( org => GetOrganizationRepositories ( org . Login ) . TakeLast ( 1 ) ) ;
214206 }
215207
216208 IObservable < IReadOnlyList < IRepositoryModel > > GetOrganizationRepositories ( string organization )
You can’t perform that action at this time.
0 commit comments