pull/1606/head
kunfei 3 years ago
parent 2d147c3e47
commit 1849b6cc1b
  1. 5
      app/src/main/java/io/legado/app/data/entities/RssReadRecord.kt
  2. 29
      app/src/main/java/io/legado/app/data/entities/RssSource.kt

@ -4,4 +4,7 @@ import androidx.room.Entity
import androidx.room.PrimaryKey import androidx.room.PrimaryKey
@Entity(tableName = "rssReadRecords") @Entity(tableName = "rssReadRecords")
data class RssReadRecord(@PrimaryKey val record: String, val read: Boolean = true) data class RssReadRecord(
@PrimaryKey val record: String,
val read: Boolean = true
)

@ -26,13 +26,13 @@ data class RssSource(
var loginCheckJs: String? = null, //登录检测js var loginCheckJs: String? = null, //登录检测js
var sortUrl: String? = null, var sortUrl: String? = null,
var singleUrl: Boolean = false, var singleUrl: Boolean = false,
//列表规则 /*列表规则*/
var articleStyle: Int = 0, //列表样式,0,1,2 var articleStyle: Int = 0, //列表样式,0,1,2
var ruleArticles: String? = null, var ruleArticles: String? = null,
var ruleNextPage: String? = null, var ruleNextPage: String? = null,
var ruleTitle: String? = null, var ruleTitle: String? = null,
var rulePubDate: String? = null, var rulePubDate: String? = null,
//webView规则 /*webView规则*/
var ruleDescription: String? = null, var ruleDescription: String? = null,
var ruleImage: String? = null, var ruleImage: String? = null,
var ruleLink: String? = null, var ruleLink: String? = null,
@ -40,6 +40,7 @@ data class RssSource(
var style: String? = null, var style: String? = null,
var enableJs: Boolean = true, var enableJs: Boolean = true,
var loadWithBaseUrl: Boolean = true, var loadWithBaseUrl: Boolean = true,
/*其它规则*/
var customOrder: Int = 0 var customOrder: Int = 0
) : Parcelable, BaseSource { ) : Parcelable, BaseSource {
@ -66,18 +67,18 @@ data class RssSource(
fun equal(source: RssSource): Boolean { fun equal(source: RssSource): Boolean {
return equal(sourceUrl, source.sourceUrl) return equal(sourceUrl, source.sourceUrl)
&& equal(sourceIcon, source.sourceIcon) && equal(sourceIcon, source.sourceIcon)
&& enabled == source.enabled && enabled == source.enabled
&& equal(sourceGroup, source.sourceGroup) && equal(sourceGroup, source.sourceGroup)
&& equal(ruleArticles, source.ruleArticles) && equal(ruleArticles, source.ruleArticles)
&& equal(ruleNextPage, source.ruleNextPage) && equal(ruleNextPage, source.ruleNextPage)
&& equal(ruleTitle, source.ruleTitle) && equal(ruleTitle, source.ruleTitle)
&& equal(rulePubDate, source.rulePubDate) && equal(rulePubDate, source.rulePubDate)
&& equal(ruleDescription, source.ruleDescription) && equal(ruleDescription, source.ruleDescription)
&& equal(ruleLink, source.ruleLink) && equal(ruleLink, source.ruleLink)
&& equal(ruleContent, source.ruleContent) && equal(ruleContent, source.ruleContent)
&& enableJs == source.enableJs && enableJs == source.enableJs
&& loadWithBaseUrl == source.loadWithBaseUrl && loadWithBaseUrl == source.loadWithBaseUrl
} }
private fun equal(a: String?, b: String?): Boolean { private fun equal(a: String?, b: String?): Boolean {

Loading…
Cancel
Save