Skip to content

Commit f763060

Browse files
committed
code_review: PR #1962
- Rename functions about auto-fetching - Ignore all exceptions while auto-fetching Signed-off-by: leo <longshuang@msn.cn>
1 parent ceb56d5 commit f763060

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ViewModels/Repository.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ public void Open()
509509
}
510510

511511
_lastFetchTime = DateTime.Now;
512-
_autoFetchTimer = new Timer(FetchInBackground, null, 5000, 5000);
512+
_autoFetchTimer = new Timer(AutoFetchByTimer, null, 5000, 5000);
513513
RefreshAll();
514514
}
515515

@@ -1812,12 +1812,12 @@ private BranchTreeNode FindBranchNode(List<BranchTreeNode> nodes, string path)
18121812
return null;
18131813
}
18141814

1815-
private void FetchInBackground(object sender)
1815+
private void AutoFetchByTimer(object sender)
18161816
{
1817-
Dispatcher.UIThread.Invoke(FetchInBackgroundOnUiThread);
1817+
Dispatcher.UIThread.Invoke(AutoFetchOnUIThread);
18181818
}
18191819

1820-
private async Task FetchInBackgroundOnUiThread()
1820+
private async Task AutoFetchOnUIThread()
18211821
{
18221822
try
18231823
{
@@ -1862,9 +1862,9 @@ private async Task FetchInBackgroundOnUiThread()
18621862
_lastFetchTime = DateTime.Now;
18631863
IsAutoFetching = false;
18641864
}
1865-
catch (OperationCanceledException)
1865+
catch
18661866
{
1867-
// Ignore cancellation.
1867+
// Ignore all exceptions.
18681868
}
18691869
}
18701870

0 commit comments

Comments
 (0)