feat: Download all transfer files / folder#359
feat: Download all transfer files / folder#359PhilippeWeidmann merged 4 commits intoprotected/st-plusfrom
Conversation
|
The changes properly inject FileManager dependencies and add v2 API folder download support via the new getFlattenedFiles helper, while cleaning up environment configuration through centralized ApiEnvironment conversion. However, inconsistent error handling (mixing try and try?) risks silently swallowing download failures, and the scattered v1/v2 API branching logic adds unnecessary complexity to the download flow. #ai-review-summary |
| private func getFlattenedFiles(for transfer: TransferUi, | ||
| files: [FileUi], | ||
| fileManager: STCore.FileManager) async throws -> [FileUi] { | ||
| guard transfer.apiSource == .v2 else { return transfer.files } |
There was a problem hiding this comment.
Add a comment explaining why folder flattening is only required for v2 API source, as this logic assumes v1 transfers never contain folders or don't need expansion.
#ai-review-inline
0906a20 to
c7b1396
Compare
There was a problem hiding this comment.
Pull request overview
Updates KMP-related dependencies and adjusts the download and injection flows to better support SwissTransfer v2 behaviors (folders / environment bridging) across Core and UI modules.
Changes:
- Bump several SwiftPM dependencies (ios-features, ios-login, multiplatform-SwissTransfer, swift-collections).
- Thread
STCore.FileManagerfromSwissTransferInjectionintoDownloadManagercall sites and use it to resolve v2 file/folder selections. - Replace hardcoded DEBUG/RELEASE KMP environment selection with
ApiEnvironment.currentbridged toSTCore.ApiEnvironment.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Tuist/Package.resolved | Updates dependency versions/revisions. |
| SwissTransferCoreUI/Components/DownloadButton.swift | Passes KMP fileManager into DownloadManager when downloading selection/all. |
| SwissTransferCoreUI/Components/DownloadableFileCellView.swift | Passes KMP fileManager into DownloadManager for single-file/folder downloads. |
| SwissTransferCore/Utils/SwissTransferInjection+Init.swift | Initializes KMP injection environment from ApiEnvironment.current (bridged). |
| SwissTransferCore/TargetAssembly.swift | Adds ApiEnvironment→KMP env bridging and sets default env based on DEBUG/RELEASE. |
| SwissTransferCore/DownloadManager.swift | Adds v2 folder flattening and uses KMP fileManager to fetch v2 transfer files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c7b1396 to
a367717
Compare
🎺 NIIIIINNNN… ninininnin… NIIIIINNNN… ninininnin… 🎶
a367717 to
9bbfe10
Compare
|



No description provided.