Update Book.kt

自定义简介有自动更新的需求时,可通过更新intro再调用upCustomIntro()完成
pull/1025/head
bushixuanqi 4 years ago committed by GitHub
parent 916a30ec1d
commit efa2af643b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      app/src/main/java/io/legado/app/data/entities/Book.kt

@ -113,6 +113,9 @@ data class Book(
fun getDisplayIntro() = if (customIntro.isNullOrEmpty()) intro else customIntro
//自定义简介有自动更新的需求时,可通过更新intro再调用upCustomIntro()完成
fun upCustomIntro() = customIntro = intro
fun fileCharset(): Charset {
return charset(charset ?: "UTF-8")
}
@ -269,4 +272,4 @@ data class Book(
@TypeConverter
fun stringToReadConfig(json: String?) = GSON.fromJsonObject<ReadConfig>(json)
}
}
}

Loading…
Cancel
Save