From 2fcf584e40bc6abb28d4d439efb963b70b7a11ea Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Wed, 11 Jan 2023 18:48:24 +0700 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=8B=D1=80=D0=B5=D0=B7=D0=B0=D0=BB=20?= =?UTF-8?q?=D0=BD=D0=B5=D0=BD=D1=83=D0=B6=D0=BD=D1=8B=D0=B9=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SettingsPage/OthersTab/OthersTab.vue | 14 -------- .../components/Reader/TextPage/TextPage.vue | 36 ------------------- client/store/modules/reader.js | 1 - 3 files changed, 51 deletions(-) diff --git a/client/components/Reader/SettingsPage/OthersTab/OthersTab.vue b/client/components/Reader/SettingsPage/OthersTab/OthersTab.vue index 6ea08e0d..eb5f0c2b 100644 --- a/client/components/Reader/SettingsPage/OthersTab/OthersTab.vue +++ b/client/components/Reader/SettingsPage/OthersTab/OthersTab.vue @@ -70,20 +70,6 @@ Другое -
-
- Обработка -
- - - Включение этой опции позволяет делать предварительную
- подготовку всего текста в ленивом режиме сразу после
- загрузки книги. Это может повысить отзывчивость читалки,
- но нагружает процессор каждый раз при открытии книги. -
-
-
-
Парам. в URL diff --git a/client/components/Reader/TextPage/TextPage.vue b/client/components/Reader/TextPage/TextPage.vue index f1fa92ab..5568a501 100644 --- a/client/components/Reader/TextPage/TextPage.vue +++ b/client/components/Reader/TextPage/TextPage.vue @@ -433,10 +433,6 @@ class TextPage { if (this.lastBook) { (async() => { try { - //подождем ленивый парсинг - this.stopLazyParse = true; - while (this.doingLazyParse) await utils.sleep(10); - const isParsed = await bookManager.hasBookParsed(this.lastBook); if (!isParsed) { return; @@ -460,8 +456,6 @@ class TextPage { await this.calcPropsAndLoadFonts(); this.refreshTime(); - if (this.lazyParseEnabled) - this.lazyParsePara(); } catch (e) { this.$root.stdDialog.alert(e.message, 'Ошибка', {color: 'negative'}); } @@ -838,36 +832,6 @@ class TextPage { this.drawStatusBar(); } - async lazyParsePara() { - if (!this.parsed || this.doingLazyParse) - return; - this.doingLazyParse = true; - let j = 0; - let k = 0; - let prevPerc = 0; - this.stopLazyParse = false; - for (let i = 0; i < this.parsed.para.length; i++) { - j++; - if (j > 1) { - await utils.sleep(1); - j = 0; - } - if (this.stopLazyParse) - break; - this.parsed.parsePara(i); - k++; - if (k > 100) { - let perc = Math.round(i/this.parsed.para.length*100); - if (perc != prevPerc) - this.drawStatusBar(`Обработка текста ${perc}%`); - prevPerc = perc; - k = 0; - } - } - this.drawStatusBar(); - this.doingLazyParse = false; - } - async refreshTime() { if (!this.timeRefreshing) { this.timeRefreshing = true; diff --git a/client/store/modules/reader.js b/client/store/modules/reader.js index d9319f3e..e8a5cc4c 100644 --- a/client/store/modules/reader.js +++ b/client/store/modules/reader.js @@ -172,7 +172,6 @@ const settingDefaults = { pageChangeAnimationSpeed: 80, //0-100% allowUrlParamBookPos: false, - lazyParseEnabled: false, copyFullText: false, showClickMapPage: true, clickControl: true,