Поправки активации HistoryPage

This commit is contained in:
Book Pauk
2019-01-28 06:41:19 +07:00
parent f59ea660ce
commit a9f9fc93fd

View File

@@ -199,8 +199,10 @@ class Reader extends Vue {
get lastOpenedBook() { get lastOpenedBook() {
const result = this.$store.getters['reader/lastOpenedBook']; const result = this.$store.getters['reader/lastOpenedBook'];
if (!result) if (!result) {
this.closeAllTextPages() this.closeAllTextPages();
this.historyActive = false;
}
return result; return result;
} }
@@ -232,7 +234,6 @@ class Reader extends Vue {
} }
closeAllTextPages() { closeAllTextPages() {
this.historyActive = false;
this.setPositionActive = false; this.setPositionActive = false;
} }
@@ -245,7 +246,7 @@ class Reader extends Vue {
historyToggle() { historyToggle() {
this.historyActive = !this.historyActive; this.historyActive = !this.historyActive;
if (this.historyActive && this.activePage == 'TextPage') { if (this.historyActive) {
this.closeAllTextPages(); this.closeAllTextPages();
this.historyActive = true; this.historyActive = true;
} else { } else {
@@ -317,9 +318,9 @@ class Reader extends Vue {
case 'scrolling': case 'scrolling':
case 'search': case 'search':
case 'copyText': case 'copyText':
case 'history':
classResult = classDisabled; classResult = classDisabled;
break; break;
case 'history':
case 'refresh': case 'refresh':
if (!this.lastOpenedBook) if (!this.lastOpenedBook)
classResult = classDisabled; classResult = classDisabled;