mirror of
https://github.com/zotero/zotero.git
synced 2026-09-21 00:22:44 +00:00
Persist EPUB CFI with setAttachmentLastPageIndex()
This commit is contained in:
parent
d975450ae1
commit
60f8d11c2d
2 changed files with 16 additions and 3 deletions
|
|
@ -655,7 +655,10 @@ class ReaderInstance {
|
|||
if (this._type === 'pdf') {
|
||||
item.setAttachmentLastPageIndex(state.pageIndex);
|
||||
}
|
||||
// epub, snapshot
|
||||
else if (this._type === 'epub') {
|
||||
item.setAttachmentLastPageIndex(state.cfi);
|
||||
}
|
||||
// snapshot
|
||||
else {
|
||||
// setAttachmentSomeProperty(state.someProperty);
|
||||
}
|
||||
|
|
@ -712,7 +715,17 @@ class ReaderInstance {
|
|||
return { pageIndex };
|
||||
}
|
||||
}
|
||||
// epub, snapshot
|
||||
else if (this._type === 'epub') {
|
||||
let cfi = item.getAttachmentLastPageIndex();
|
||||
if (state) {
|
||||
state.cfi = cfi;
|
||||
return state;
|
||||
}
|
||||
else {
|
||||
return { cfi };
|
||||
}
|
||||
}
|
||||
// snapshot
|
||||
else {
|
||||
// let someProperty = item.getAttachmentSomeProperty();
|
||||
// if (state) {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 247e7b5cfd1e67db503a634556d5fcb57312d3d6
|
||||
Subproject commit 4d674215617933746c8d5b3fce2cc85b67e3006e
|
||||
Loading…
Add table
Reference in a new issue