diff --git a/JetPDFVue/src/main/java/com/pratikk/jetpdfvue/state/HorizontalVueReaderState.kt b/JetPDFVue/src/main/java/com/pratikk/jetpdfvue/state/HorizontalVueReaderState.kt index eb7eca2..5730db7 100644 --- a/JetPDFVue/src/main/java/com/pratikk/jetpdfvue/state/HorizontalVueReaderState.kt +++ b/JetPDFVue/src/main/java/com/pratikk/jetpdfvue/state/HorizontalVueReaderState.kt @@ -63,7 +63,7 @@ class HorizontalVueReaderState( it.importJob?.cancel() val resource = it.file?.let { file -> - if (it.vueResource is VueResourceType.BlankDocument) + if (it.vueResource is VueResourceType.BlankDocument && !it.isDocumentModified) VueResourceType.BlankDocument(file.toUri()) else VueResourceType.Local( diff --git a/JetPDFVue/src/main/java/com/pratikk/jetpdfvue/state/VerticalVueReaderState.kt b/JetPDFVue/src/main/java/com/pratikk/jetpdfvue/state/VerticalVueReaderState.kt index 191cdc9..3cade77 100644 --- a/JetPDFVue/src/main/java/com/pratikk/jetpdfvue/state/VerticalVueReaderState.kt +++ b/JetPDFVue/src/main/java/com/pratikk/jetpdfvue/state/VerticalVueReaderState.kt @@ -65,7 +65,7 @@ class VerticalVueReaderState( it.importJob?.cancel() val resource = it.file?.let { file -> - if (it.vueResource is VueResourceType.BlankDocument) + if (it.vueResource is VueResourceType.BlankDocument && !it.isDocumentModified) VueResourceType.BlankDocument(file.toUri()) else VueResourceType.Local(