| β¦ | β¦ | @@ -0,0 +1,70 @@ | |
| 50 | + | trustAllCerts={false} | |
| 51 | + | enableAnnotationRendering | |
| 52 | + | enableDoubleTapZoom | |
| 53 | + | onError={() => | |
π’ Low components/PdfPreview.android.tsx:53
When <Pdf> reports a rendering error, its cache directory remains on disk until the modal closes or the user retries. Setting error replaces <Pdf> but does not unmount NativePdfPreview, so the effect cleanup that disposes cached does not run; make the disposer accessible to onError and invoke it there as well.
π Reply "fix it for me" or copy this AI Prompt for your agent:
| 1 | In file @apps/mobile/src/components/PdfPreview.android.tsx around line 53: |
| 2 | |
| 3 | When `<Pdf>` reports a rendering error, its cache directory remains on disk until the modal closes or the user retries. Setting `error` replaces `<Pdf>` but does not unmount `NativePdfPreview`, so the effect cleanup that disposes `cached` does not run; make the disposer accessible to `onError` and invoke it there as well. |
Note
Generated by GPT 6.1 Sol
Fixed in 8aac4795d0. The native renderer now disposes the cached PDF immediately in onError and clears the reference, so closing or retrying cannot dispose it a second time.