Merge pull request #2207 from Kalinundefined/master

修改部分墨水屏设备使用体验
pull/2210/head^2
kunfei 2 years ago committed by GitHub
commit a546c222fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt
  2. 3
      app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt
  3. 4
      app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt

@ -1,7 +1,7 @@
package io.legado.app.ui.about
import java.text.SimpleDateFormat
import android.content.Context
import android.icu.text.SimpleDateFormat
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem

@ -21,6 +21,7 @@ import io.legado.app.data.entities.BookChapter
import io.legado.app.data.entities.BookSource
import io.legado.app.databinding.ActivityBookInfoBinding
import io.legado.app.databinding.DialogEditTextBinding
import io.legado.app.help.config.AppConfig
import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.theme.backgroundColor
import io.legado.app.lib.theme.bottomBackground
@ -247,9 +248,11 @@ class BookInfoActivity :
private fun showCover(book: Book) {
binding.ivCover.load(book.getDisplayCover(), book.name, book.author, false, book.origin)
if(!AppConfig.isEInkMode) {
BookCover.loadBlur(this, book.getDisplayCover())
.into(binding.bgBook)
}
}
private fun upLoading(isLoading: Boolean, chapterList: List<BookChapter>? = null) {
when {

@ -201,7 +201,7 @@ class ReadMenu @JvmOverloads constructor(
activity?.window?.attributes = params
}
fun runMenuIn(anim: Boolean = AppConfig.isEInkMode) {
fun runMenuIn(anim: Boolean = !AppConfig.isEInkMode) {
this.visible()
binding.titleBar.visible()
binding.bottomMenu.visible()
@ -214,7 +214,7 @@ class ReadMenu @JvmOverloads constructor(
}
}
fun runMenuOut(anim: Boolean = AppConfig.isEInkMode, onMenuOutEnd: (() -> Unit)? = null) {
fun runMenuOut(anim: Boolean = !AppConfig.isEInkMode, onMenuOutEnd: (() -> Unit)? = null) {
this.onMenuOutEnd = onMenuOutEnd
if (this.isVisible) {
if (anim) {

Loading…
Cancel
Save