pull/32/head
kunfei 5 years ago
parent 30d5153ffc
commit e2b4134c18
  1. 2
      app/src/main/java/io/legado/app/data/entities/SearchBook.kt
  2. 2
      app/src/main/java/io/legado/app/lib/theme/ATH.kt
  3. 3
      app/src/main/java/io/legado/app/model/webbook/BookList.kt

@ -21,7 +21,7 @@ data class SearchBook(
var author: String? = null,
var tag: String? = null,
var coverUrl: String? = null,
var description: String? = null,
var intro: String? = null,
var latestChapterTitle: String? = null,
var time: Long = 0L,
var variable: String? = null,

@ -89,9 +89,7 @@ object ATH {
fun setTaskDescriptionColor(activity: Activity, @ColorInt color: Int) {
val color1: Int
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
// Task description requires fully opaque color
color1 = ColorUtils.stripAlpha(color)
// Sets color of entry in the system recents page
activity.setTaskDescription(ActivityManager.TaskDescription(activity.title as String, null, color1))
}
}

@ -43,6 +43,7 @@ class BookList {
private fun getItem(analyzeRule: AnalyzeRule, bookSource: BookSource, baseUrl: String): SearchBook? {
val searchBook = SearchBook()
searchBook.bookUrl = baseUrl
analyzeRule.setBook(searchBook)
with(bookSource.getBookInfoRule()) {
init?.let {
@ -52,7 +53,7 @@ class BookList {
if (!searchBook.name.isNullOrEmpty()) {
searchBook.author = analyzeRule.getString(author ?: "")
searchBook.coverUrl = analyzeRule.getString(coverUrl ?: "")
searchBook.bookUrl = baseUrl
searchBook.intro = analyzeRule.getString(intro ?: "")
return searchBook
}
}

Loading…
Cancel
Save