Thread decoration: add and branch isThreaded method
This commit is contained in:
parent
30436e4406
commit
36fdf243cc
10 changed files with 23 additions and 5 deletions
|
|
@ -32,6 +32,7 @@ data class MessageContent(
|
|||
val body: String,
|
||||
val inReplyTo: InReplyTo?,
|
||||
val isEdited: Boolean,
|
||||
val isThreaded: Boolean,
|
||||
val type: MessageType?
|
||||
) : EventContent
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,11 @@ data class EventTimelineItem(
|
|||
fun inReplyTo(): InReplyTo? {
|
||||
return (content as? MessageContent)?.inReplyTo
|
||||
}
|
||||
|
||||
fun isThreaded(): Boolean {
|
||||
return (content as? MessageContent)?.isThreaded ?: false
|
||||
}
|
||||
|
||||
fun hasNotLoadedInReplyTo(): Boolean {
|
||||
val details = inReplyTo()
|
||||
return details is InReplyTo.NotLoaded
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue