Merge branch 'gedoor:master' into master

pull/2210/head
SJJ 2 years ago committed by GitHub
commit c257d1ca0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/src/main/java/io/legado/app/help/BookHelp.kt
  2. 2
      app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt
  3. 3
      app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt
  4. 4
      app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt

@ -165,7 +165,7 @@ object BookHelp {
fun getEpubFile(book: Book): ZipFile { fun getEpubFile(book: Book): ZipFile {
val uri = Uri.parse(book.bookUrl) val uri = Uri.parse(book.bookUrl)
if (uri.isContentScheme()) { if (uri.isContentScheme()) {
val path = FileUtils.getPath(downloadDir, cacheFolderName, book.originName) val path = FileUtils.getPath(downloadDir, cacheFolderName, book.getFolderName(), book.originName)
val file = File(path) val file = File(path)
val doc = DocumentFile.fromSingleUri(appCtx, uri) val doc = DocumentFile.fromSingleUri(appCtx, uri)
?: throw IOException("文件不存在") ?: throw IOException("文件不存在")

@ -1,7 +1,7 @@
package io.legado.app.ui.about package io.legado.app.ui.about
import java.text.SimpleDateFormat
import android.content.Context import android.content.Context
import android.icu.text.SimpleDateFormat
import android.os.Bundle import android.os.Bundle
import android.view.Menu import android.view.Menu
import android.view.MenuItem 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.data.entities.BookSource
import io.legado.app.databinding.ActivityBookInfoBinding import io.legado.app.databinding.ActivityBookInfoBinding
import io.legado.app.databinding.DialogEditTextBinding 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.dialogs.alert
import io.legado.app.lib.theme.backgroundColor import io.legado.app.lib.theme.backgroundColor
import io.legado.app.lib.theme.bottomBackground import io.legado.app.lib.theme.bottomBackground
@ -247,9 +248,11 @@ class BookInfoActivity :
private fun showCover(book: Book) { private fun showCover(book: Book) {
binding.ivCover.load(book.getDisplayCover(), book.name, book.author, false, book.origin) binding.ivCover.load(book.getDisplayCover(), book.name, book.author, false, book.origin)
if(!AppConfig.isEInkMode) {
BookCover.loadBlur(this, book.getDisplayCover()) BookCover.loadBlur(this, book.getDisplayCover())
.into(binding.bgBook) .into(binding.bgBook)
} }
}
private fun upLoading(isLoading: Boolean, chapterList: List<BookChapter>? = null) { private fun upLoading(isLoading: Boolean, chapterList: List<BookChapter>? = null) {
when { when {

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

Loading…
Cancel
Save