Fix misleading identifier

Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
This commit is contained in:
Dominic Fischer 2020-11-08 14:37:02 +00:00
parent 0753ba3495
commit 62ca9a2a84

View file

@ -164,7 +164,7 @@ class RoomDetailViewModel @AssistedInject constructor(
getUnreadState()
observeSyncState()
observeEventDisplayedActions()
getDraftIfAny()
loadDraftIfAny()
observeUnreadState()
observeMyRoomMember()
observeActiveRoomWidgets()
@ -495,7 +495,7 @@ class RoomDetailViewModel @AssistedInject constructor(
}
}
private fun getDraftIfAny() {
private fun loadDraftIfAny() {
val currentDraft = room.getDraft() ?: return
setState {
copy(
@ -772,7 +772,7 @@ class RoomDetailViewModel @AssistedInject constructor(
private fun popDraft() = withState {
if (it.sendMode is SendMode.REGULAR && it.sendMode.fromSharing) {
// If we were sharing, we want to get back our last value from draft
getDraftIfAny()
loadDraftIfAny()
} else {
// Otherwise we clear the composer and remove the draft from db
setState { copy(sendMode = SendMode.REGULAR("", false)) }