mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-26 22:57:32 +00:00
fix(files): serve the stored offline copy when a live download stalls
Opening a document that was stored for offline use fetched it from the server first and only fell back to the stored copy when the request rejected. On a weak or stalled connection the request never rejects, so a boarding pass already on the phone could spin indefinitely. With a stored copy, the live download now gets five seconds, request and body together; after that the stored copy is served and the download is aborted. A connection that breaks while the body arrives serves the copy as well. An HTTP error that comes back in time still surfaces over the copy, and without a stored copy the download waits as long as it always did. The test file is now formatted and leaves the format baseline.
This commit is contained in:
@@ -2121,7 +2121,6 @@
|
||||
"tests/unit/sync/tripSyncManager.test.ts",
|
||||
"tests/unit/tripStore.test.ts",
|
||||
"tests/unit/utils/cleanAmount.test.ts",
|
||||
"tests/unit/utils/fileDownload.test.ts",
|
||||
"tests/unit/utils/formatters.test.ts",
|
||||
"tests/unit/utils/placeFiles.test.ts",
|
||||
"tests/unit/utils/shellGuard.test.ts",
|
||||
|
||||
Reference in New Issue
Block a user