Simplify fix time waiting
This commit is contained in:
@@ -193,16 +193,14 @@ namespace FileTime.Avalonia.Application
|
|||||||
|
|
||||||
await UpdateParents(token);
|
await UpdateParents(token);
|
||||||
|
|
||||||
var start = DateTime.Now;
|
|
||||||
|
|
||||||
if (!skipCancellationWaiting)
|
if (!skipCancellationWaiting)
|
||||||
{
|
{
|
||||||
do
|
try
|
||||||
{
|
{
|
||||||
await Task.Delay(1, token);
|
await Task.Delay(500, token);
|
||||||
if (token.IsCancellationRequested) return;
|
|
||||||
}
|
}
|
||||||
while ((DateTime.Now - start).Milliseconds <= 500);
|
catch { }
|
||||||
|
if (token.IsCancellationRequested) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ChildContainer = newChildContainer;
|
ChildContainer = newChildContainer;
|
||||||
|
|||||||
@@ -165,7 +165,6 @@ namespace FileTime.Avalonia.ViewModels
|
|||||||
}
|
}
|
||||||
places.Add(new PlaceInfo(name, container));
|
places.Add(new PlaceInfo(name, container));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
LocalContentProvider.Unload();
|
LocalContentProvider.Unload();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user