From a603d7aa410d588485294f7791f027388b4a2661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=80=E6=A2=A6=E5=8D=83=E5=B9=B4?= <421281095@qq.com> Date: Wed, 21 Jan 2026 14:06:26 +0800 Subject: [PATCH] =?UTF-8?q?refactor(send):=20=E4=BC=98=E5=8C=96=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E4=BC=A0=E6=B5=81=E7=A8=8B=E5=B9=B6=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E8=B0=83=E8=AF=95=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除了批次间的延迟等待逻辑 - 注释掉了网盘路径刷新功能以提升性能 - 移除了文件上传完成事件触发器 - 添加了上传进度计算功能 - 优化了内存管理和垃圾回收时机 --- ViewModel/Send/SendViewModel.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ViewModel/Send/SendViewModel.cs b/ViewModel/Send/SendViewModel.cs index 3b1ed16..33e6e4e 100644 --- a/ViewModel/Send/SendViewModel.cs +++ b/ViewModel/Send/SendViewModel.cs @@ -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) {