- tweak: loading popup thinks
* - tweak: change loading handle logic * - tweak: beautify loading thinks * - fix: speed thinks while downloading
This commit is contained in:
@@ -5,7 +5,7 @@ namespace Nebula.Shared.Services;
|
||||
|
||||
public partial class ContentService
|
||||
{
|
||||
public bool CheckMigration(ILoadingHandler loadingHandler)
|
||||
public bool CheckMigration(ILoadingHandlerFactory loadingHandler)
|
||||
{
|
||||
_logger.Log("Checking migration...");
|
||||
|
||||
@@ -17,16 +17,13 @@ public partial class ContentService
|
||||
return true;
|
||||
}
|
||||
|
||||
private void DoMigration(ILoadingHandler loadingHandler, List<string> migrationList)
|
||||
private void DoMigration(ILoadingHandlerFactory loadingHandler, List<string> migrationList)
|
||||
{
|
||||
loadingHandler.SetJobsCount(migrationList.Count);
|
||||
var mainLoadingHandler = loadingHandler.CreateLoadingContext();
|
||||
mainLoadingHandler.SetJobsCount(migrationList.Count);
|
||||
|
||||
Parallel.ForEach(migrationList, (f,_)=>MigrateFile(f,loadingHandler));
|
||||
|
||||
if (loadingHandler is IDisposable disposable)
|
||||
{
|
||||
disposable.Dispose();
|
||||
}
|
||||
Parallel.ForEach(migrationList, (f,_)=>MigrateFile(f, mainLoadingHandler) );
|
||||
loadingHandler.Dispose();
|
||||
}
|
||||
|
||||
private void MigrateFile(string file, ILoadingHandler loadingHandler)
|
||||
|
||||
Reference in New Issue
Block a user