summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-07-02 08:03:15 +0300
committerAndrew Dolgov <[email protected]>2018-07-02 08:03:15 +0300
commita42f5887aee2560cec360845e89fe66092ec352b (patch)
tree17d387cecb7ec525188f84baca482c57e40ee202
parent35314ef1f24b4a99c0e46769bafde8133b034d85 (diff)
storelastread: allow page == 0 since its a % now
-rw-r--r--backend.php2
-rw-r--r--js/read.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/backend.php b/backend.php
index 607f923..9af5509 100644
--- a/backend.php
+++ b/backend.php
@@ -205,7 +205,7 @@
$bookid = (int) $_REQUEST["id"];
$cfi = $_REQUEST["cfi"];
- if ($page && $bookid) {
+ if ($bookid) {
$ldb->beginTransaction();
diff --git a/js/read.js b/js/read.js
index 455bb03..38bed68 100644
--- a/js/read.js
+++ b/js/read.js
@@ -55,7 +55,7 @@ function open_lastread() {
{cfi: data.cfi, page: data.page, total: data.total});
try {
- if (item.cfi != data.cfi && (!item.page || data.page > item.page))
+ if (item.cfi != data.cfi && (!item.page || data.page >= item.page))
book.rendition.display(data.cfi);
} catch (e) {
console.warn(e);