aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/io/jamesbarnett/redditlite/model/PostDetail.kt
blob: c5b58f06839c470a088058e5ef14e2fcf18b7c4d (plain)
1
2
3
4
5
6
7
8
9
package io.jamesbarnett.redditlite.model

import org.apache.commons.text.StringEscapeUtils

data class PostDetail(val post: Post, val comments: List<Comment>) {
  val isSelfPost get() = post.isSelfPost
  val selftextHtmlUnescaped: String? get() = StringEscapeUtils.unescapeHtml4(post.selftextHtml)
  val commentCount get() = post.commentCount
}