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() {
|
private fun loadDraftIfAny() {
|
||||||
val currentDraft = room.getDraft() ?: return
|
val currentDraft = room.getDraft()
|
||||||
setState {
|
setState {
|
||||||
copy(
|
copy(
|
||||||
// Create a sendMode from a draft and retrieve the TimelineEvent
|
// Create a sendMode from a draft and retrieve the TimelineEvent
|
||||||
|
@ -517,6 +517,7 @@ class RoomDetailViewModel @AssistedInject constructor(
|
||||||
SendMode.EDIT(timelineEvent, currentDraft.text)
|
SendMode.EDIT(timelineEvent, currentDraft.text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else -> null
|
||||||
} ?: SendMode.REGULAR("", fromSharing = false)
|
} ?: SendMode.REGULAR("", fromSharing = false)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue