mirror of
https://github.com/bulwarkmail/native.git
synced 2026-11-01 08:06:13 +00:00
fix: release a PDF that finishes opening after its preview was closed
This commit is contained in:
@@ -224,6 +224,8 @@ export function useFilePreview(opts: {
|
||||
zipUnreadable: t('email_viewer.preview.archive_unreadable', "This archive can't be opened here."),
|
||||
}, colors.current);
|
||||
if (current()) setItem(next);
|
||||
// Closed while the PDF was opening: end() ran before the document was.
|
||||
else closePdfPages(local.uri);
|
||||
} catch (e) {
|
||||
if (!current()) return;
|
||||
close();
|
||||
|
||||
Reference in New Issue
Block a user