Fix draft bug
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
This commit is contained in:
parent
62ca9a2a84
commit
dee6f35888
|
@ -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 New Issue