diff --git a/client/components/Reader/HistoryPage/HistoryPage.vue b/client/components/Reader/HistoryPage/HistoryPage.vue
index 11311576..0a3267e2 100644
--- a/client/components/Reader/HistoryPage/HistoryPage.vue
+++ b/client/components/Reader/HistoryPage/HistoryPage.vue
@@ -194,6 +194,7 @@ class HistoryPage extends Vue {
async handleDel(key) {
await bookManager.delRecentBook({key});
+ this.$emit('most-recent-book');
this.updateTableData();
}
diff --git a/client/components/Reader/Reader.vue b/client/components/Reader/Reader.vue
index 5069c2df..cb000338 100644
--- a/client/components/Reader/Reader.vue
+++ b/client/components/Reader/Reader.vue
@@ -66,7 +66,7 @@
@stop-text-search="stopTextSearch">
-
+
@@ -145,6 +145,7 @@ class Reader extends Vue {
bookPos = null;
allowUrlParamBookPos = false;
showRefreshIcon = true;
+ mostRecentBookReactive = null;
created() {
this.commit = this.$store.commit;
@@ -237,6 +238,7 @@ class Reader extends Vue {
const result = bookManager.mostRecentBook();
if (!result)
this.closeAllTextPages();
+ this.mostRecentBookReactive = result;
return result;
}
@@ -467,7 +469,7 @@ class Reader extends Vue {
result = 'ProgressPage';
else if (this.loaderActive)
result = 'LoaderPage';
- else if (this.mostRecentBook())
+ else if (this.mostRecentBookReactive)
result = 'TextPage';
if (!result) {
@@ -482,7 +484,7 @@ class Reader extends Vue {
if (this.lastActivePage != result && result == 'TextPage') {
//акивируем страницу с текстом
this.$nextTick(async() => {
- const last = this.mostRecentBook();
+ const last = this.mostRecentBookReactive;
const isParsed = await bookManager.hasBookParsed(last);
if (!isParsed) {
@@ -533,6 +535,7 @@ class Reader extends Vue {
// если есть в локальном кеше
if (bookParsed) {
await bookManager.setRecentBook(Object.assign({bookPos, bookPosSeen}, bookManager.metaOnly(bookParsed)));
+ this.mostRecentBook();
this.loaderActive = false;
progress.hide(); this.progressActive = false;
this.blinkCachedLoadMessage();
@@ -572,6 +575,7 @@ class Reader extends Vue {
// добавляем в историю
await bookManager.setRecentBook(Object.assign({bookPos, bookPosSeen}, bookManager.metaOnly(addedBook)));
+ this.mostRecentBook();
this.updateRoute(true);
this.loaderActive = false;