iOS transfers: 'Uploading...' then 'Uploaded' notification, and count share uploads
The Share Extension's session had no delegate, so a fast upload finished unseen and the invalidated session was discarded before the app could hear of it - no summary notification. Results are now handled by a shared delegate in whichever process is alive, started/finished notifications replace each other in place, and the app refreshes the folder the extension uploaded to. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
afc9b90963
commit
0c063c1fb4
@@ -185,4 +185,19 @@ class RunnerTests: XCTestCase {
|
||||
XCTAssertEqual(finished?.failed, 1)
|
||||
XCTAssertEqual(finished?.remoteFolder, "/Docs")
|
||||
}
|
||||
|
||||
func testFinishedUploadFoldersAreNotedOnceAndConsumed() {
|
||||
_ = TransferBatchStore.consumeFinishedUploadFolders() // start clean
|
||||
TransferBatchStore.noteFinishedUpload(folder: "/Docs")
|
||||
TransferBatchStore.noteFinishedUpload(folder: "/Docs")
|
||||
TransferBatchStore.noteFinishedUpload(folder: "/Photos")
|
||||
|
||||
XCTAssertEqual(TransferBatchStore.consumeFinishedUploadFolders(), ["/Docs", "/Photos"])
|
||||
XCTAssertEqual(TransferBatchStore.consumeFinishedUploadFolders(), [])
|
||||
}
|
||||
|
||||
func testNotificationFileCountWording() {
|
||||
XCTAssertEqual(TransferNotifications.files(1), "1 file")
|
||||
XCTAssertEqual(TransferNotifications.files(3), "3 files")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user