mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
fix(files): file notes, links, stars and the trash changed offline wait in the queue and sync once the connection is back
Every file write went straight to the API, so offline a star snapped back
without a word and moving a file to the trash failed with "Failed to delete
file". Notes, the place or booking of a file, a further link, the star, the
trash move, restore, delete for good and emptying the trash now go through
fileRepo and the mutation queue like the other trip data: the local copy
changes at once, and an online write to a file that still has an older one
queued joins the queue behind it, since file writes carry no version token.
The desktop file manager, its assign dialog and the phone's files tab,
menu, link and trash sheets all write through it.
The single file answers carry no ids of further links, so a replayed edit,
star or restore keeps the ones the local copy holds, and the link answer
({ success, links }) writes no row.
What only works online says so instead of failing: an upload shows that it
needs a connection, a place saved with newly picked files is stopped with a
hint, and removing a further link (its row id is known only to the server)
asks to try again once online.
Refs #2601
This commit is contained in:
@@ -47,9 +47,7 @@
|
||||
"src/components/Files/FileManagerImageLightbox.tsx",
|
||||
"src/components/Files/docsync/useConflicts.ts",
|
||||
"src/components/Files/docsync/useDocSync.ts",
|
||||
"src/components/Files/fileActions.ts",
|
||||
"src/components/Files/useFileManager.ts",
|
||||
"src/components/Files/useFileTrash.ts",
|
||||
"src/components/Files/useMediaLightbox.ts",
|
||||
"src/components/Journey/ContributorInviteDialog.tsx",
|
||||
"src/components/Journey/JourneyDetailPageEntryCard.tsx",
|
||||
@@ -134,7 +132,6 @@
|
||||
"src/mobile/screens/journey/MJourneyDetail.tsx",
|
||||
"src/mobile/screens/trip/plan/useMPlanTimeline.ts",
|
||||
"src/mobile/screens/trip/tabs/MCollabNotes.tsx",
|
||||
"src/mobile/screens/trip/tabs/MFilesTab.tsx",
|
||||
"src/pages/JourneyDetailPage.tsx",
|
||||
"src/pages/OAuthAuthorizePage.tsx",
|
||||
"src/pages/TripPlannerPage.tsx",
|
||||
|
||||
Reference in New Issue
Block a user