From e72f8f4245cc3b96ea96c35ee4623564efb3d0bd Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Fri, 6 Nov 2020 17:36:05 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BA=D0=B8=D0=B9=20=D1=80?= =?UTF-8?q?=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80=D0=B8=D0=BD=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Reader/TextPage/TextPage.vue | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/client/components/Reader/TextPage/TextPage.vue b/client/components/Reader/TextPage/TextPage.vue index 0fe7f20d..04c3d897 100644 --- a/client/components/Reader/TextPage/TextPage.vue +++ b/client/components/Reader/TextPage/TextPage.vue @@ -904,8 +904,7 @@ class TextPage extends Vue { if (!this.settingsChanging) { this.settingsChanging = true; const newSize = (this.settings.fontSize + 1 < 200 ? this.settings.fontSize + 1 : 100); - const newSettings = Object.assign({}, this.settings, {fontSize: newSize}); - this.commit('reader/setSettings', newSettings); + this.commit('reader/setSettings', {fontSize: newSize}); await sleep(50); this.settingsChanging = false; } @@ -915,8 +914,7 @@ class TextPage extends Vue { if (!this.settingsChanging) { this.settingsChanging = true; const newSize = (this.settings.fontSize - 1 > 5 ? this.settings.fontSize - 1 : 5); - const newSettings = Object.assign({}, this.settings, {fontSize: newSize}); - this.commit('reader/setSettings', newSettings); + this.commit('reader/setSettings', {fontSize: newSize}); await sleep(50); this.settingsChanging = false; } @@ -926,8 +924,7 @@ class TextPage extends Vue { if (!this.settingsChanging) { this.settingsChanging = true; const newDelay = (this.settings.scrollingDelay - 50 > 1 ? this.settings.scrollingDelay - 50 : 1); - const newSettings = Object.assign({}, this.settings, {scrollingDelay: newDelay}); - this.commit('reader/setSettings', newSettings); + this.commit('reader/setSettings', {scrollingDelay: newDelay}); await sleep(50); this.settingsChanging = false; } @@ -937,8 +934,7 @@ class TextPage extends Vue { if (!this.settingsChanging) { this.settingsChanging = true; const newDelay = (this.settings.scrollingDelay + 50 < 10000 ? this.settings.scrollingDelay + 50 : 10000); - const newSettings = Object.assign({}, this.settings, {scrollingDelay: newDelay}); - this.commit('reader/setSettings', newSettings); + this.commit('reader/setSettings', {scrollingDelay: newDelay}); await sleep(50); this.settingsChanging = false; }