Merge pull request #1298 from vector-im/feature/fga/timeline_thread_decoration

Feature/fga/timeline thread decoration
This commit is contained in:
ganfra 2023-09-14 18:45:33 +02:00 committed by GitHub
commit 239730702d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 178 additions and 69 deletions

View file

@ -32,6 +32,7 @@ data class MessageContent(
val body: String,
val inReplyTo: InReplyTo?,
val isEdited: Boolean,
val isThreaded: Boolean,
val type: MessageType?
) : EventContent

View file

@ -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