Tries to highlight that there are two states here for Compose to observe.

pull/792/head
Vitor Pamplona 2024-03-01 16:15:06 -05:00
rodzic 3f500ef5b3
commit c34811e05b
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -1416,7 +1416,8 @@ fun RenderTextEvent(
val subject = (note.event as? TextNoteEvent)?.subject()?.ifEmpty { null }
val newBody =
if (editState.value is GenericLoadable.Loaded) {
(editState.value as? GenericLoadable.Loaded)?.loaded?.modificationToShow?.value?.event?.content() ?: body
val state = (editState.value as? GenericLoadable.Loaded)?.loaded?.modificationToShow
state?.value?.event?.content() ?: body
} else {
body
}