summaryrefslogtreecommitdiff
path: root/js/read.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/read.js')
-rw-r--r--js/read.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/js/read.js b/js/read.js
index d4c2f36..2cf0bb1 100644
--- a/js/read.js
+++ b/js/read.js
@@ -36,7 +36,13 @@ function open_lastread() {
// CFI missing or w/e
try {
- if (item.cfi) book.rendition.display(item.cfi);
+
+ // this is ridiculous tbh
+ if (item.cfi) book.rendition.display(item.cfi).then(() => {
+ book.rendition.display(item.cfi);
+ });
+
+ return;
} catch (e) {
console.warn(e);
}
@@ -52,7 +58,11 @@ function open_lastread() {
try {
if (item.cfi != data.cfi && (!item.page || data.page >= item.page))
- book.rendition.display(data.cfi);
+ console.log('using remote lastread...');
+
+ book.rendition.display(data.cfi).then(() => {
+ book.rendition.display(data.cfi);
+ });
} catch (e) {
console.warn(e);
}