pull/2319/head
Horis 2 years ago
parent 496b2ed7ab
commit b3a4c7e9d9
  1. 1711
      app/schemas/io.legado.app.data.AppDatabase/54.json
  2. 2
      app/src/main/java/io/legado/app/model/localBook/LocalBook.kt
  3. 2
      app/src/main/java/io/legado/app/ui/association/FileAssociationActivity.kt
  4. 20
      app/src/main/java/io/legado/app/utils/ImageUtils.kt

File diff suppressed because it is too large Load Diff

@ -268,7 +268,7 @@ object LocalBook {
var doc = treeDoc!!.findFile(fileName)
if (doc == null) {
doc = treeDoc.createFile(FileUtils.getMimeType(fileName), fileName)
?: throw SecurityException("Permission Denial")
?: throw SecurityException("请重新设置书籍保存位置\nPermission Denial")
}
appCtx.contentResolver.openOutputStream(doc.uri)!!.use { oStream ->
inputStream.copyTo(oStream)

@ -145,7 +145,7 @@ class FileAssociationActivity :
if (doc == null || fileDoc.lastModified > doc.lastModified()) {
if (doc == null) {
doc = treeDoc.createFile(FileUtils.getMimeType(name), name)
?: throw SecurityException("Permission Denial")
?: throw SecurityException("请重新设置书籍保存位置\nPermission Denial")
}
contentResolver.openOutputStream(doc.uri)!!.use { oStream ->
inputStream.copyTo(oStream)

@ -55,15 +55,15 @@ object ImageUtils {
}
private fun getRuleJs(
source: BaseSource?, isCover: Boolean
): String? {
return when (source) {
is BookSource ->
if (isCover) source?.coverDecodeJs else source?.getContentRule()?.imageDecode
is RssSource -> source?.coverDecodeJs
else -> null
}
}
private fun getRuleJs(
source: BaseSource?, isCover: Boolean
): String? {
return when (source) {
is BookSource ->
if (isCover) source.coverDecodeJs else source.getContentRule().imageDecode
is RssSource -> source.coverDecodeJs
else -> null
}
}
}
Loading…
Cancel
Save