diff --git a/lib/ui/epub_viewer.dart b/lib/ui/epub_viewer.dart index 8832ed7..47adb78 100644 --- a/lib/ui/epub_viewer.dart +++ b/lib/ui/epub_viewer.dart @@ -33,7 +33,8 @@ Future launchEpubViewer( String? epubConfig = await dataBase.getBookState(fileName); if (openWithExternalApp) { - await OpenFile.open(path, linuxByProcess: true); + await OpenFile.open(path, + linuxByProcess: true, type: "application/epub+zip"); } else { try { VocsyEpub.setConfig( diff --git a/lib/ui/pdf_viewer.dart b/lib/ui/pdf_viewer.dart index fe0a6d2..0c6c8d0 100644 --- a/lib/ui/pdf_viewer.dart +++ b/lib/ui/pdf_viewer.dart @@ -29,7 +29,7 @@ Future launchPdfViewer( bool openWithExternalApp = ref.watch(openPdfWithExternalAppProvider); if (openWithExternalApp) { String path = await getFilePath(fileName); - await OpenFile.open(path, linuxByProcess: true); + await OpenFile.open(path, linuxByProcess: true, type: "application/pdf"); } else { Navigator.push(context, MaterialPageRoute(builder: (BuildContext context) { return PdfView(