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(