From cd4fb75c9db9d9c2ee51e7ad158cdb364a33458a Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Sun, 3 Feb 2019 22:56:23 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BA?= =?UTF-8?q?=D0=B8=20=D0=B1=D0=B0=D0=B3=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Reader/HistoryPage/HistoryPage.vue | 3 +++ client/components/Reader/Reader.vue | 11 +++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/client/components/Reader/HistoryPage/HistoryPage.vue b/client/components/Reader/HistoryPage/HistoryPage.vue index 36aaa911..78096196 100644 --- a/client/components/Reader/HistoryPage/HistoryPage.vue +++ b/client/components/Reader/HistoryPage/HistoryPage.vue @@ -200,7 +200,10 @@ class HistoryPage extends Vue { const newRecent = bookManager.mostRecentBook(); if (this.mostRecentBook != newRecent) this.$emit('load-book', newRecent); + this.mostRecentBook = newRecent; + if (!this.mostRecentBook) + this.close(); } loadBook(url) { diff --git a/client/components/Reader/Reader.vue b/client/components/Reader/Reader.vue index c1e11765..68ba537d 100644 --- a/client/components/Reader/Reader.vue +++ b/client/components/Reader/Reader.vue @@ -203,8 +203,9 @@ class Reader extends Vue { } updateRoute(isNewRoute) { - const pos = (this.bookPos != undefined && this.allowUrlParamBookPos ? `__p=${this.bookPos}&` : ''); - const url = (this.mostRecentBook() ? `url=${this.mostRecentBook().url}` : ''); + const recent = this.mostRecentBook(); + const pos = (recent && recent.bookPos && this.allowUrlParamBookPos ? `__p=${recent.bookPos}&` : ''); + const url = (recent ? `url=${recent.url}` : ''); if (isNewRoute) this.$router.push(`/reader?${pos}${url}`); else @@ -236,8 +237,6 @@ class Reader extends Vue { mostRecentBook() { const result = bookManager.mostRecentBook(); - if (!result) - this.closeAllTextPages(); this.mostRecentBookReactive = result; return result; } @@ -363,7 +362,7 @@ class Reader extends Vue { this.$refs.copyTextPage.init(this.mostRecentBook().bookPos, page.parsed, this.copyFullText); }); } else { - this.searchActive = false; + this.copyTextActive = false; } } @@ -511,7 +510,7 @@ class Reader extends Vue { this.mostRecentBook(); return; } - + this.progressActive = true; this.$nextTick(async() => { const progress = this.$refs.page;