Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/ViewModels/Repository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1814,7 +1814,12 @@ private BranchTreeNode FindBranchNode(List<BranchTreeNode> nodes, string path)

private void FetchInBackground(object sender)
{
Dispatcher.UIThread.Invoke(async Task () =>
Dispatcher.UIThread.Invoke(FetchInBackgroundOnUiThread);
}

private async Task FetchInBackgroundOnUiThread()
{
try
{
if (_settings is not { EnableAutoFetch: true })
return;
Expand Down Expand Up @@ -1856,7 +1861,11 @@ private void FetchInBackground(object sender)

_lastFetchTime = DateTime.Now;
IsAutoFetching = false;
});
}
catch (OperationCanceledException)
{
// Ignore cancellation.
}
}

private readonly bool _isWorktree = false;
Expand Down
Loading