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