From f78e2383edbb275c48cdbd688402bf7ca6a77b20 Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 4 Mar 2020 09:36:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/App.kt | 6 +----- .../java/io/legado/app/ui/book/read/page/ChapterProvider.kt | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/io/legado/app/App.kt b/app/src/main/java/io/legado/app/App.kt index 95f29cd64..88379b333 100644 --- a/app/src/main/java/io/legado/app/App.kt +++ b/app/src/main/java/io/legado/app/App.kt @@ -48,12 +48,8 @@ class App : Application() { versionCode = it.versionCode versionName = it.versionName } - - if (!ThemeStore.isConfigured(this, versionCode)) applyTheme() - initNightMode() - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) createChannelId() - + applyDayNight() LiveEventBus.get() .config() .supportBroadcast(this) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/ChapterProvider.kt b/app/src/main/java/io/legado/app/ui/book/read/page/ChapterProvider.kt index bc9dfc6e1..7725759c8 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/ChapterProvider.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/ChapterProvider.kt @@ -231,7 +231,7 @@ object ChapterProvider { textLine.text = "$words\n" var x = startX for (i in words.indices) { - val char = words[i].toString() + val char = words.substring(i, i + 1) val cw = StaticLayout.getDesiredWidth(char, textPaint) val x1 = x + cw textLine.addTextChar(