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

This commit is contained in:
Book Pauk
2019-10-17 17:20:43 +07:00
parent 2ec1dd58a5
commit 75cb611701

View File

@@ -510,15 +510,14 @@ class Reader extends Vue {
} }
async bookManagerEvent(eventName) { async bookManagerEvent(eventName) {
if (eventName == 'recent-changed') {
if (this.recentBooksActive) {
await this.$refs.recentBooksPage.updateTableData();
}
}
if (eventName == 'set-recent' || eventName == 'recent-deleted') { 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 && oldBook.key == newBook.key)) {
this.mostRecentBook();
}
if (oldBook && newBook) { if (oldBook && newBook) {
if (oldBook.key != newBook.key) { if (oldBook.key != newBook.key) {
this.loadingBook = true; this.loadingBook = true;
@@ -533,6 +532,12 @@ class Reader extends Vue {
} }
} }
} }
if (eventName == 'recent-changed') {
if (this.recentBooksActive) {
await this.$refs.recentBooksPage.updateTableData();
}
}
} }
get toolBarActive() { get toolBarActive() {
@@ -1063,7 +1068,7 @@ class Reader extends Vue {
let page = this.$refs.page; let page = this.$refs.page;
while (this.blinkCount) { while (this.blinkCount) {
this.showRefreshIcon = !this.showRefreshIcon; this.showRefreshIcon = !this.showRefreshIcon;
if (page.blinkCachedLoadMessage) if (page && page.blinkCachedLoadMessage)
page.blinkCachedLoadMessage(this.showRefreshIcon); page.blinkCachedLoadMessage(this.showRefreshIcon);
await utils.sleep(500); await utils.sleep(500);
if (this.stopBlink) if (this.stopBlink)
@@ -1073,7 +1078,7 @@ class Reader extends Vue {
} }
this.showRefreshIcon = true; this.showRefreshIcon = true;
this.inBlink = false; this.inBlink = false;
if (page.blinkCachedLoadMessage) if (page && page.blinkCachedLoadMessage)
page.blinkCachedLoadMessage('finish'); page.blinkCachedLoadMessage('finish');
}); });
} }