Skip to content

Commit 6de0225

Browse files
Refactor: Use async/await for GitSyncAction
1 parent ec7cfdc commit 6de0225

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Files.App/Actions/Git/GitSyncAction.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ public GitSyncAction()
2323
_context.PropertyChanged += Context_PropertyChanged;
2424
}
2525

26-
public Task ExecuteAsync(object? parameter = null)
26+
public async Task ExecuteAsync(object? parameter = null)
2727
{
2828
var instance = _context.ShellPage?.InstanceViewModel;
2929

30-
return GitHelpers.PullOriginAsync(instance?.GitRepositoryPath)
31-
.ContinueWith(t => GitHelpers.PushToOriginAsync(
32-
instance?.GitRepositoryPath,
33-
instance?.GitBranchName));
30+
await GitHelpers.PullOriginAsync(instance?.GitRepositoryPath);
31+
await GitHelpers.PushToOriginAsync(
32+
instance?.GitRepositoryPath,
33+
instance?.GitBranchName);
3434
}
3535

3636
private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e)

0 commit comments

Comments
 (0)