mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-05 10:24:05 +00:00
fix(pdf): shrink place photos without AbortSignal.timeout and decode them near thumbnail size (#1501)
Safari before 16 has no AbortSignal.timeout, which cost the whole export; a controller and a timer replace it. Photos decode at twice the thumbnail height and three at a time, so a long trip no longer ends the web view.
This commit is contained in:
@@ -275,7 +275,7 @@ export async function downloadTripPDF({ trip, days, places, assignments: allStor
|
||||
return url ? [url] : []
|
||||
})),
|
||||
signal,
|
||||
)
|
||||
).catch(() => new Map<string, string>())
|
||||
|
||||
const totalAssigned = new Set(
|
||||
Object.values(assignments).flatMap(a => a.map(x => x.place?.id)).filter(Boolean)
|
||||
|
||||
Reference in New Issue
Block a user