Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit bd95ae7

Browse files
committed
Make the code more straightforward
1 parent 8cf8825 commit bd95ae7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/GitHub.App/Services/ModelService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public ITrackingCollection<IPullRequestModel> GetPullRequests(ISimpleRepositoryM
146146
var keyobs = GetUserFromCache()
147147
.Select(user => string.Format(CultureInfo.InvariantCulture, "{0}|{1}|pr", user.Login, repo.Name));
148148

149-
TrackingCollection<IPullRequestModel> col = null;
149+
var col = new TrackingCollection<IPullRequestModel>();
150150

151151
var source = Observable.Defer(() => keyobs
152152
.SelectMany(key =>
@@ -160,7 +160,7 @@ public ITrackingCollection<IPullRequestModel> GetPullRequests(ISimpleRepositoryM
160160
.Select(Create)
161161
);
162162

163-
col = new TrackingCollection<IPullRequestModel>(source);
163+
col.Listen(source);
164164
return col;
165165
}
166166

src/GitHub.Exports.Reactive/Collections/TrackingCollection.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ public TrackingCollection(IObservable<T> source,
9898
IScheduler scheduler = null)
9999
: this(comparer, filter, scheduler)
100100
{
101-
this.source = source;
102101
Listen(source);
103102
}
104103

0 commit comments

Comments
 (0)