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