Эх сурвалжийг харах

Улучшение синхронизации

Book Pauk 5 жил өмнө
parent
commit
fd0f523c64

+ 2 - 0
client/components/Reader/Reader.vue

@@ -510,7 +510,9 @@ class Reader extends Vue {
             if (this.recentBooksActive) {
                 await this.$refs.recentBooksPage.updateTableData();
             }
+        }
 
+        if (eventName == 'set-recent') {
             const oldBook = this.mostRecentBookReactive;
             const newBook = bookManager.mostRecentBook();
             if (oldBook && newBook) {

+ 1 - 0
client/components/Reader/share/bookManager.js

@@ -450,6 +450,7 @@ class BookManager {
         await bmRecentStore.setItem('recent-last', this.recentLast);
 
         this.recentChanged = true;
+        this.emit('set-recent');
         this.emit('recent-changed');
     }