Destroy EventTimelineItem pointer after use
This commit is contained in:
parent
55154ce0b3
commit
4a32a78884
1 changed files with 6 additions and 4 deletions
|
|
@ -238,10 +238,12 @@ class RustMatrixRoom(
|
||||||
withContext(roomDispatcher) {
|
withContext(roomDispatcher) {
|
||||||
if (originalEventId != null) {
|
if (originalEventId != null) {
|
||||||
runCatching {
|
runCatching {
|
||||||
innerRoom.edit(
|
innerRoom.getEventTimelineItemByEventId(originalEventId.value).use {
|
||||||
newContent = messageEventContentFromParts(body, htmlBody),
|
innerRoom.edit(
|
||||||
editItem = innerRoom.getEventTimelineItemByEventId(originalEventId.value),
|
newContent = messageEventContentFromParts(body, htmlBody),
|
||||||
)
|
editItem = it,
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
runCatching {
|
runCatching {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue