From 0fde10874da6b1b36317394e855dc68413268859 Mon Sep 17 00:00:00 2001 From: Code Love Date: Sat, 7 Jun 2025 20:13:29 -0400 Subject: feat(mobile): Add support for viewing PDFs (#1519) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(mobile): add react-native-pdf dependency Add react-native-pdf package to enable PDF viewing functionality in the mobile app. This will be used to display PDF bookmarks directly within the app. Part of #597 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude * feat(mobile): add PDF viewer component with authentication support Add a dedicated PDFViewer component that handles downloading and displaying PDF assets with proper authentication headers. Features include: - Download progress indication - Error handling with user-friendly messages - Automatic cleanup of temporary files - Proper memory management to prevent leaks - Content type validation for PDF files Part of #597 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude * feat(mobile): integrate PDF viewing in bookmark detail view Integrate the PDFViewer component to display PDF bookmarks inline. When a bookmark is a PDF asset, it now renders using the dedicated PDF viewer instead of treating it as an image. Also adds external PDF opening functionality with platform-specific handling for iOS and Android, proper filename handling, and temporary file cleanup. Additionally fixes dark mode styling for the navigation header to ensure proper contrast in both light and dark themes. Part of #597 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude * revert the open externally button * use react query for downloading the pdf --------- Co-authored-by: Claude Co-authored-by: MohamedBassem --- apps/mobile/package.json | 1 + 1 file changed, 1 insertion(+) (limited to 'apps/mobile/package.json') diff --git a/apps/mobile/package.json b/apps/mobile/package.json index 4ce6a718..4902249a 100644 --- a/apps/mobile/package.json +++ b/apps/mobile/package.json @@ -48,6 +48,7 @@ "react-native-gesture-handler": "~2.21.2", "react-native-image-viewing": "^0.2.2", "react-native-markdown-display": "^7.0.2", + "react-native-pdf": "^6.7.7", "react-native-reanimated": "^3.16.2", "react-native-safe-area-context": "4.12.0", "react-native-screens": "~4.1.0", -- cgit v1.2.3-70-g09d2