From d186dd26a295b415fb5413e9ae4e5daa673e1b9c Mon Sep 17 00:00:00 2001 From: Kingtous Date: Fri, 13 May 2022 15:11:56 +0800 Subject: [PATCH] fix: change state to sync jobs to adapt master branch logic --- src/ui/file_transfer.tis | 2 +- src/ui/remote.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ui/file_transfer.tis b/src/ui/file_transfer.tis index 026bb94a5..bcf59b388 100644 --- a/src/ui/file_transfer.tis +++ b/src/ui/file_transfer.tis @@ -621,7 +621,7 @@ function initializeFileTransfer() } handler.updateFolderFiles = function(fd) { - stdout.println("update folder files: " + JSON.stringify(fd)); + // stdout.println("update folder files: " + JSON.stringify(fd)); fd.entries = fd.entries || []; if (fd.id > 0) { var jt = file_transfer.job_table; diff --git a/src/ui/remote.rs b/src/ui/remote.rs index c1f8c63cb..89ad6b9e3 100644 --- a/src/ui/remote.rs +++ b/src/ui/remote.rs @@ -1319,6 +1319,7 @@ async fn io_loop(handler: Handler) { clipboard_file_context: None, }; remote.io_loop(&key, &token).await; + remote.sync_jobs_status_to_local().await; } struct RemoveJob { @@ -1451,7 +1452,6 @@ impl Remote { } } } - self.sync_jobs_status_to_local().await; log::debug!("Exit io_loop of id={}", self.handler.id); } Err(err) => { @@ -1876,6 +1876,7 @@ impl Remote { let json_str = serde_json::to_string(&job.gen_meta()).unwrap(); transfer_metas.write_jobs.push(json_str); } + log::info!("meta: {:?}",transfer_metas); config.transfer = transfer_metas; self.handler.save_config(config); true