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

This commit is contained in:
Book Pauk
2019-03-22 20:14:33 +07:00
parent 92d929b704
commit 3f6b468021
2 changed files with 29 additions and 5 deletions

View File

@@ -310,14 +310,24 @@ class Reader extends Vue {
}
if (eventName == 'recent-changed' || eventName == 'save-recent') {
if (this.historyActive) {
this.$refs.historyPage.updateTableData();
}
(async() => {
const oldBook = this.mostRecentBookReactive;
const newBook = bookManager.mostRecentBook();
if (oldBook && newBook) {
if (oldBook.key != newBook.key) {
await this.loadBook(newBook);
this.loadingBook = true;
try {
await this.loadBook(newBook);
} finally {
this.loadingBook = false;
}
} else if (oldBook.bookPos != newBook.bookPos) {
while (this.loadingBook) await utils.sleep(100);
this.bookPosChanged({bookPos: newBook.bookPos});
}
}