mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-07 15:41:38 +01: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()
|
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)) }
|
||||||
|
Loading…
Reference in New Issue
Block a user