Мелкий рефакторинг

This commit is contained in:
Book Pauk
2020-10-30 11:30:21 +07:00
parent 48c93a2120
commit 5e815eb3c4

View File

@@ -1203,29 +1203,28 @@ class Reader extends Vue {
if (this.$root.stdDialog.active || this.$refs.dialog1.active || this.$refs.dialog2.active) if (this.$root.stdDialog.active || this.$refs.dialog1.active || this.$refs.dialog2.active)
return result; return result;
let handled = false; if (!result && this.helpActive)
if (!handled && this.helpActive) result = this.$refs.helpPage.keyHook(event);
handled = this.$refs.helpPage.keyHook(event);
if (!handled && this.settingsActive) if (!result && this.settingsActive)
handled = this.$refs.settingsPage.keyHook(event); result = this.$refs.settingsPage.keyHook(event);
if (!handled && this.recentBooksActive) if (!result && this.recentBooksActive)
handled = this.$refs.recentBooksPage.keyHook(event); result = this.$refs.recentBooksPage.keyHook(event);
if (!handled && this.setPositionActive) if (!result && this.setPositionActive)
handled = this.$refs.setPositionPage.keyHook(event); result = this.$refs.setPositionPage.keyHook(event);
if (!handled && this.searchActive) if (!result && this.searchActive)
handled = this.$refs.searchPage.keyHook(event); result = this.$refs.searchPage.keyHook(event);
if (!handled && this.copyTextActive) if (!result && this.copyTextActive)
handled = this.$refs.copyTextPage.keyHook(event); result = this.$refs.copyTextPage.keyHook(event);
if (!handled && this.$refs.page && this.$refs.page.keyHook) if (!result && this.$refs.page && this.$refs.page.keyHook)
handled = this.$refs.page.keyHook(event); result = this.$refs.page.keyHook(event);
if (!handled && event.type == 'keydown') { if (!result && event.type == 'keydown') {
const action = this.$root.readerActionByKeyEvent(event); const action = this.$root.readerActionByKeyEvent(event);
if (action == 'loader') { if (action == 'loader') {