2018-10-09 01:20:43 +02:00
|
|
|
package jp.juggler.subwaytooter.api.entity
|
|
|
|
|
|
|
|
import jp.juggler.subwaytooter.api.TootParser
|
2023-01-13 13:22:25 +01:00
|
|
|
import jp.juggler.util.data.JsonObject
|
2018-10-09 01:20:43 +02:00
|
|
|
|
2021-06-20 15:12:25 +02:00
|
|
|
class TootConversationSummary(parser: TootParser, src: JsonObject) : TimelineItem() {
|
|
|
|
|
|
|
|
val id: EntityId
|
|
|
|
val accounts: ArrayList<TootAccountRef>
|
|
|
|
val last_status: TootStatus
|
|
|
|
var unread: Boolean // タップ時にクリアする
|
|
|
|
|
|
|
|
init {
|
|
|
|
this.id = EntityId.mayDefault(src.string("id"))
|
2023-02-07 13:49:45 +01:00
|
|
|
this.accounts = parser.accountRefList(src.jsonArray("accounts"))
|
2021-06-20 15:12:25 +02:00
|
|
|
this.last_status = parser.status(src.jsonObject("last_status"))!!
|
|
|
|
this.unread = src.optBoolean("unread")
|
|
|
|
|
|
|
|
this.last_status.conversationSummary = this
|
|
|
|
}
|
|
|
|
|
|
|
|
override fun getOrderId() = id
|
2018-10-09 01:20:43 +02:00
|
|
|
}
|