Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 37e78a7

Browse files
Moving Then and Start calls to separate lines
1 parent 48564ff commit 37e78a7

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

src/GitHub.Api/Git/Repository.cs

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ public ITask Pull()
188188

189189
public ITask Push()
190190
{
191-
return repositoryManager.Push(CurrentRemote.Value.Name, CurrentBranch?.Name).Then(UpdateGitStatus);
191+
return repositoryManager.Push(CurrentRemote.Value.Name, CurrentBranch?.Name)
192+
.Then(UpdateGitStatus);
192193
}
193194

194195
public ITask Fetch()
@@ -203,12 +204,14 @@ public ITask Revert(string changeset)
203204

204205
public ITask RequestLock(string file)
205206
{
206-
return repositoryManager.LockFile(file).Then(UpdateLocks);
207+
return repositoryManager.LockFile(file)
208+
.Then(UpdateLocks);
207209
}
208210

209211
public ITask ReleaseLock(string file, bool force)
210212
{
211-
return repositoryManager.UnlockFile(file, force).Then(UpdateLocks);
213+
return repositoryManager.UnlockFile(file, force)
214+
.Then(UpdateLocks);
212215
}
213216

214217
public void CheckLogChangedEvent(CacheUpdateEvent cacheUpdateEvent)
@@ -389,19 +392,25 @@ private void RepositoryManager_OnRepositoryUpdated()
389392

390393
private void UpdateGitStatus()
391394
{
392-
repositoryManager?.Status().ThenInUI((b, status) => { CurrentStatus = status; }).Start();
395+
repositoryManager?.Status()
396+
.ThenInUI((b, status) => { CurrentStatus = status; })
397+
.Start();
393398
}
394399

395400
private void UpdateGitLog()
396401
{
397-
repositoryManager?.Log().ThenInUI((b, log) => { CurrentLog = log; }).Start();
402+
repositoryManager?.Log()
403+
.ThenInUI((b, log) => { CurrentLog = log; })
404+
.Start();
398405
}
399406

400407
private void UpdateLocks()
401408
{
402409
if (CurrentRemote.HasValue)
403410
{
404-
repositoryManager?.ListLocks(false).ThenInUI((b, locks) => { CurrentLocks = locks; }).Start();
411+
repositoryManager?.ListLocks(false)
412+
.ThenInUI((b, locks) => { CurrentLocks = locks; })
413+
.Start();
405414
}
406415
}
407416

0 commit comments

Comments
 (0)