refactor(send): 优化文件上传流程并移除调试代码

- 移除了批次间的延迟等待逻辑
- 注释掉了网盘路径刷新功能以提升性能
- 移除了文件上传完成事件触发器
- 添加了上传进度计算功能
- 优化了内存管理和垃圾回收时机
dev2.0
一梦千年 2026-01-21 14:06:26 +08:00
parent fad06a926b
commit a603d7aa41
1 changed files with 4 additions and 5 deletions

View File

@ -666,7 +666,6 @@ namespace HeBianGu.App.Disk
});
await Task.WhenAll(batchTasks);
// 批次间短暂延迟,避免过度占用资源
await Task.Delay(100);
}
@ -700,7 +699,7 @@ namespace HeBianGu.App.Disk
}
// 刷新网盘空间页面以显示新上传的文件
_explorerBehavior?.RefreshMinIOPath(CurrentMinIOPath);
//_explorerBehavior?.RefreshMinIOPath(CurrentMinIOPath);
// 执行垃圾回收以释放内存
GC.Collect();
@ -829,11 +828,11 @@ namespace HeBianGu.App.Disk
FileCount = (CompleteItems.Count) + "/" + (UpLoadItems.Count + CompleteItems.Count);
UpdateFileCounts();
// 刷新当前目录
_explorerBehavior?.RefreshMinIOPath(CurrentMinIOPath);
//_explorerBehavior?.RefreshMinIOPath(CurrentMinIOPath);
// 触发上传完成事件
FileUploadCompleted?.Invoke(CurrentMinIOPath);
//FileUploadCompleted?.Invoke(CurrentMinIOPath);
Progress = (CompleteItems.Count) / (UpLoadItems.Count + CompleteItems.Count);
// 更新网盘空间页面状态
/*if (_explorerBehavior != null)
{