Bugfix: Only continue on refresh timer if ui Update has been completed
This commit is contained in:
parent
fe2499707d
commit
cc743cd602
@ -505,6 +505,11 @@ namespace BreCalClient
|
||||
try
|
||||
{
|
||||
double interval = (double) SHIPCALL_UPDATE_INTERVAL_SECONDS / PROGRESS_STEPS;
|
||||
|
||||
if (Interlocked.CompareExchange(ref _uiUpdateRunning, 1, 0) == 1) // do not restart progress unless UI update has completed
|
||||
await Task.Delay(TimeSpan.FromSeconds(interval));
|
||||
|
||||
System.Diagnostics.Trace.WriteLine("restarting refresh countdown");
|
||||
for (int i = 0; i < PROGRESS_STEPS; i++)
|
||||
{
|
||||
await Task.Delay(TimeSpan.FromSeconds(interval), _tokenSource.Token);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user