浏览代码

Поправки багов

Book Pauk 5 年之前
父节点
当前提交
49b3f05d65
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 1
      client/components/Reader/Reader.vue
  2. 1 0
      client/components/Reader/share/bookManager.js

+ 1 - 1
client/components/Reader/Reader.vue

@@ -512,7 +512,7 @@ class Reader extends Vue {
             }
             }
         }
         }
 
 
-        if (eventName == 'set-recent') {
+        if (eventName == 'set-recent' || eventName == 'recent-deleted') {
             const oldBook = this.mostRecentBookReactive;
             const oldBook = this.mostRecentBookReactive;
             const newBook = bookManager.mostRecentBook();
             const newBook = bookManager.mostRecentBook();
             if (oldBook && newBook) {
             if (oldBook && newBook) {

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

@@ -370,6 +370,7 @@ class BookManager {
             this.recentLast = null;
             this.recentLast = null;
             await bmRecentStore.setItem('recent-last', this.recentLast);
             await bmRecentStore.setItem('recent-last', this.recentLast);
         }
         }
+        this.emit('recent-deleted', value.key);
         this.emit('recent-changed', value.key);
         this.emit('recent-changed', value.key);
     }
     }