mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-15 01:35:07 +08:00
Fix misleading identifier
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
This commit is contained in:
parent
0753ba3495
commit
62ca9a2a84
@ -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)) }
|
||||
|
Loading…
Reference in New Issue
Block a user