UiProgressSink runs on the TransferJob worker thread: every call only mirrors figures into TransferStatus. It does not render — the main loop draws the transfer modal from TransferStatus::snapshot() every frame, so the UI keeps animating while the copy runs on the worker. The batch active flag is owned by TransferStatus::beginLocalBatch / end, raised and lowered by the TransferJob around the whole
| 34 | // TransferStatus::beginLocalBatch / end, raised and lowered by the TransferJob |
| 35 | // around the whole batch. |
| 36 | void UiProgressSink::begin(const std::string& mode, size_t totalFiles) |
| 37 | { |
| 38 | // A backup sink carries a cancel flag; a restore sink does not. That is |
| 39 | // exactly the "may this run be cancelled?" fact the modal needs. |
| 40 | TransferStatus::beginLocalRun(mode, totalFiles, mCancelFlag != nullptr); |
| 41 | } |
| 42 | |
| 43 | void UiProgressSink::startFile(const std::string& name, u64 size) |
| 44 | { |
no test coverage detected