mirror of
https://github.com/element-hq/element-android
synced 2024-11-25 02:45:37 +03:00
Fix draft bug
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
This commit is contained in:
parent
62ca9a2a84
commit
dee6f35888
1 changed files with 2 additions and 1 deletions
|
@ -496,7 +496,7 @@ class RoomDetailViewModel @AssistedInject constructor(
|
|||
}
|
||||
|
||||
private fun loadDraftIfAny() {
|
||||
val currentDraft = room.getDraft() ?: return
|
||||
val currentDraft = room.getDraft()
|
||||
setState {
|
||||
copy(
|
||||
// Create a sendMode from a draft and retrieve the TimelineEvent
|
||||
|
@ -517,6 +517,7 @@ class RoomDetailViewModel @AssistedInject constructor(
|
|||
SendMode.EDIT(timelineEvent, currentDraft.text)
|
||||
}
|
||||
}
|
||||
else -> null
|
||||
} ?: SendMode.REGULAR("", fromSharing = false)
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue