diff --git a/client/components/Reader/HistoryPage/HistoryPage.vue b/client/components/Reader/HistoryPage/HistoryPage.vue index 0a3267e2..36aaa911 100644 --- a/client/components/Reader/HistoryPage/HistoryPage.vue +++ b/client/components/Reader/HistoryPage/HistoryPage.vue @@ -120,6 +120,7 @@ class HistoryPage extends Vue { mounted() { this.updateTableData(); + this.mostRecentBook = bookManager.mostRecentBook(); } updateTableData() { @@ -194,12 +195,17 @@ class HistoryPage extends Vue { async handleDel(key) { await bookManager.delRecentBook({key}); - this.$emit('most-recent-book'); this.updateTableData(); + + const newRecent = bookManager.mostRecentBook(); + if (this.mostRecentBook != newRecent) + this.$emit('load-book', newRecent); + this.mostRecentBook = newRecent; } loadBook(url) { this.$emit('load-book', {url}); + this.close(); } close() { diff --git a/client/components/Reader/Reader.vue b/client/components/Reader/Reader.vue index cb000338..c1e11765 100644 --- a/client/components/Reader/Reader.vue +++ b/client/components/Reader/Reader.vue @@ -66,7 +66,7 @@ @stop-text-search="stopTextSearch"> - + @@ -485,7 +485,6 @@ class Reader extends Vue { //акивируем страницу с текстом this.$nextTick(async() => { const last = this.mostRecentBookReactive; - const isParsed = await bookManager.hasBookParsed(last); if (!isParsed) { this.$root.$emit('set-app-title'); @@ -508,7 +507,11 @@ class Reader extends Vue { } loadBook(opts) { - this.closeAllTextPages(); + if (!opts) { + this.mostRecentBook(); + return; + } + this.progressActive = true; this.$nextTick(async() => { const progress = this.$refs.page;