|
|
@ -19,32 +19,23 @@ data class RssArticle( |
|
|
|
var image: String? = null, |
|
|
|
var image: String? = null, |
|
|
|
var read: Boolean = false |
|
|
|
var read: Boolean = false |
|
|
|
) { |
|
|
|
) { |
|
|
|
|
|
|
|
|
|
|
|
override fun hashCode(): Int { |
|
|
|
override fun hashCode() = link.hashCode() |
|
|
|
return link.hashCode() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun equals(other: Any?): Boolean { |
|
|
|
override fun equals(other: Any?): Boolean { |
|
|
|
if (other == null) { |
|
|
|
other ?: return false |
|
|
|
return false |
|
|
|
return if (other is RssArticle) origin == other.origin && link == other.link else false |
|
|
|
} |
|
|
|
|
|
|
|
if (other is RssArticle) { |
|
|
|
|
|
|
|
return origin == other.origin && link == other.link |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fun toStar(): RssStar { |
|
|
|
|
|
|
|
return RssStar( |
|
|
|
|
|
|
|
origin = origin, |
|
|
|
|
|
|
|
sort = sort, |
|
|
|
|
|
|
|
title = title, |
|
|
|
|
|
|
|
starTime = System.currentTimeMillis(), |
|
|
|
|
|
|
|
link = link, |
|
|
|
|
|
|
|
pubDate = pubDate, |
|
|
|
|
|
|
|
description = description, |
|
|
|
|
|
|
|
content = content, |
|
|
|
|
|
|
|
image = image |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fun toStar() = RssStar( |
|
|
|
|
|
|
|
origin = origin, |
|
|
|
|
|
|
|
sort = sort, |
|
|
|
|
|
|
|
title = title, |
|
|
|
|
|
|
|
starTime = System.currentTimeMillis(), |
|
|
|
|
|
|
|
link = link, |
|
|
|
|
|
|
|
pubDate = pubDate, |
|
|
|
|
|
|
|
description = description, |
|
|
|
|
|
|
|
content = content, |
|
|
|
|
|
|
|
image = image |
|
|
|
|
|
|
|
) |
|
|
|
} |
|
|
|
} |