From e4c8ddaa88e94ed421c6f18d6527ed4851c161a2 Mon Sep 17 00:00:00 2001 From: dstark5 Date: Tue, 29 Aug 2023 06:36:55 -0700 Subject: [PATCH] fixed crashing --- lib/ui/components/file_buttons_widget.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ui/components/file_buttons_widget.dart b/lib/ui/components/file_buttons_widget.dart index 18cdcf7..65dd84c 100644 --- a/lib/ui/components/file_buttons_widget.dart +++ b/lib/ui/components/file_buttons_widget.dart @@ -114,7 +114,9 @@ Future launchEpubViewer( scrollDirection: EpubScrollDirection.HORIZONTAL, ); - if ((epubConfig?.isNotEmpty ?? true) && (epubConfig != null)) { + if ((epubConfig?.isNotEmpty ?? true) && + (epubConfig != null) && + (!(epubConfig.startsWith('epubcfi')))) { VocsyEpub.open(path, lastLocation: EpubLocator.fromJson(json.decode(epubConfig))); } else {