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

Loading…
Cancel
Save