diff --git a/chrome/content/zotero/xpcom/reader.js b/chrome/content/zotero/xpcom/reader.js index c11110d722..8f6f23bfcf 100644 --- a/chrome/content/zotero/xpcom/reader.js +++ b/chrome/content/zotero/xpcom/reader.js @@ -658,9 +658,8 @@ class ReaderInstance { else if (this._type === 'epub') { item.setAttachmentLastPageIndex(state.cfi); } - // snapshot - else { - // setAttachmentSomeProperty(state.someProperty); + else if (this._type === 'snapshot') { + item.setAttachmentLastPageIndex(state.scrollYPercent); } let file = Zotero.Attachments.getStorageDirectory(item); if (!await OS.File.exists(file.path)) { @@ -725,14 +724,15 @@ class ReaderInstance { return { cfi }; } } - // snapshot - else { - // let someProperty = item.getAttachmentSomeProperty(); - // if (state) { - // state.someProperty = someProperty; - // return state; - // } - // return { someProperty }; + else if (this._type === 'snapshot') { + let scrollYPercent = item.getAttachmentLastPageIndex(); + if (state) { + state.scrollYPercent = scrollYPercent; + return state; + } + else { + return { scrollYPercent }; + } } return null; } diff --git a/pdf-reader b/pdf-reader index 4d67421561..f73f0ef3fa 160000 --- a/pdf-reader +++ b/pdf-reader @@ -1 +1 @@ -Subproject commit 4d674215617933746c8d5b3fce2cc85b67e3006e +Subproject commit f73f0ef3fad04f70f525199eaa6a0eab3f8d67aa