Horis %!s(int64=2) %!d(string=hai) anos
pai
achega
8f082b6f68

+ 1 - 3
app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt

@@ -303,9 +303,7 @@ class ReadBookActivity : BaseReadBookActivity(),
         if (bookChanged) {
             bookChanged = false
             ReadBook.callBack = this
-            viewModel.initData(intent) {
-                upMenu()
-            }
+            viewModel.initData(intent)
         } else {
             //web端阅读时,app处于阅读界面,本地记录会覆盖web保存的进度,在此处恢复
             ReadBook.webBookProgress?.let {

+ 1 - 0
app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt

@@ -159,6 +159,7 @@ class MoreConfigDialog : DialogFragment() {
                 }
 
                 PreferKey.optimizeRender -> {
+                    ChapterProvider.upStyle()
                     ReadBook.callBack?.upPageAnim(true)
                     ReadBook.loadContent(false)
                 }

+ 1 - 1
app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt

@@ -200,7 +200,7 @@ class ReadStyleDialog : BaseDialogFragment(R.layout.dialog_read_book_style),
     override fun selectFont(path: String) {
         if (path != ReadBookConfig.textFont) {
             ReadBookConfig.textFont = path
-            postEvent(EventBus.UP_CONFIG, arrayListOf(8, 5))
+            postEvent(EventBus.UP_CONFIG, arrayListOf(2, 5))
         }
     }
 

+ 6 - 2
app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt

@@ -881,7 +881,9 @@ object ChapterProvider {
         tPaint.typeface = titleFont
         tPaint.textSize = with(ReadBookConfig) { textSize + titleSize }.toFloat().spToPx()
         tPaint.isAntiAlias = true
-        tPaint.isLinearText = true
+        if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q && AppConfig.optimizeRender) {
+            tPaint.isLinearText = true
+        }
         //正文
         val cPaint = TextPaint()
         cPaint.color = ReadBookConfig.textColor
@@ -889,7 +891,9 @@ object ChapterProvider {
         cPaint.typeface = textFont
         cPaint.textSize = ReadBookConfig.textSize.toFloat().spToPx()
         cPaint.isAntiAlias = true
-        cPaint.isLinearText = true
+        if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q && AppConfig.optimizeRender) {
+            cPaint.isLinearText = true
+        }
         return Pair(tPaint, cPaint)
     }