summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-10-19 22:08:17 +0300
committerAndrew Dolgov <[email protected]>2018-10-19 22:08:17 +0300
commit89a4710493417c4504aff824e7f89a42b7f9a9d0 (patch)
tree64bbfa12e047065a518a59a761230985468a10d0 /js
parentc62fa6c187285713c41735ffa0c3f8a996671d73 (diff)
open lastread location twice. why? i don't even care anymore
Diffstat (limited to '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);
}