pull/32/head
parent
7d398f5226
commit
cc7816949f
@ -0,0 +1,27 @@ |
||||
package io.legado.app.data.entities |
||||
|
||||
import io.legado.app.utils.splitNotBlank |
||||
|
||||
data class SearchShow( |
||||
var name: String? = null, |
||||
var author: String? = null, |
||||
var kind: String? = null, |
||||
var coverUrl: String? = null, |
||||
var intro: String? = null, |
||||
var wordCount: String? = null, |
||||
var latestChapterTitle: String? = null, |
||||
var time: Long = 0L, |
||||
var originCount: Int = 0 |
||||
) { |
||||
fun getKindList(): List<String> { |
||||
val kindList = arrayListOf<String>() |
||||
wordCount?.let { |
||||
if (it.isNotBlank()) kindList.add(it) |
||||
} |
||||
kind?.let { |
||||
val kinds = it.splitNotBlank(",", "\n") |
||||
kindList.addAll(kinds) |
||||
} |
||||
return kindList |
||||
} |
||||
} |
Loading…
Reference in new issue