This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree 1 file changed +4
-12
lines changed
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()
98
98
{
99
99
return hostCache . GetAndRefreshObject ( "user" ,
100
100
( ) => apiClient . GetUser ( ) . Select ( AccountCacheItem . Create ) , TimeSpan . FromMinutes ( 5 ) , TimeSpan . FromDays ( 7 ) )
101
- . PublishLast ( )
102
- . RefCount ( )
101
+ . TakeLast ( 1 )
103
102
. ToList ( ) ;
104
103
}
105
104
@@ -126,12 +125,8 @@ IObservable<IEnumerable<AccountCacheItem>> GetUserOrganizations()
126
125
public IObservable < IReadOnlyList < IRepositoryModel > > GetRepositories ( )
127
126
{
128
127
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 ) )
135
130
. Concat ( GetAllRepositoriesForAllOrganizations ( ) ) ;
136
131
}
137
132
@@ -207,10 +202,7 @@ IObservable<IReadOnlyList<IRepositoryModel>> GetAllRepositoriesForAllOrganizatio
207
202
{
208
203
return GetUserOrganizations ( )
209
204
. SelectMany ( org => org . ToObservable ( ) )
210
- . SelectMany ( org => GetOrganizationRepositories ( org . Login )
211
- . PublishLast ( )
212
- . RefCount ( )
213
- ) ;
205
+ . SelectMany ( org => GetOrganizationRepositories ( org . Login ) . TakeLast ( 1 ) ) ;
214
206
}
215
207
216
208
IObservable < IReadOnlyList < IRepositoryModel > > GetOrganizationRepositories ( string organization )
You can’t perform that action at this time.
0 commit comments