Simplify the management of inReplyToEventTimelineItem
This commit is contained in:
parent
a192a8823f
commit
c9c7af6e06
4 changed files with 3 additions and 29 deletions
|
|
@ -139,6 +139,7 @@ class RustMatrixRoom(
|
|||
roomCoroutineScope.cancel()
|
||||
innerRoom.destroy()
|
||||
roomListItem.destroy()
|
||||
inReplyToEventTimelineItem?.destroy()
|
||||
}
|
||||
|
||||
override val name: String?
|
||||
|
|
@ -272,13 +273,6 @@ class RustMatrixRoom(
|
|||
}
|
||||
}
|
||||
|
||||
override suspend fun exitReplyMode(): Result<Unit> = withContext(roomDispatcher) {
|
||||
runCatching {
|
||||
inReplyToEventTimelineItem?.destroy()
|
||||
inReplyToEventTimelineItem = null
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun replyMessage(eventId: EventId, body: String, htmlBody: String?): Result<Unit> = withContext(roomDispatcher) {
|
||||
runCatching {
|
||||
val inReplyTo = inReplyToEventTimelineItem ?: innerRoom.getEventTimelineItemByEventId(eventId.value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue