Avoids circular rendering of Drafts.

pull/824/head
Vitor Pamplona 2024-04-04 18:06:27 -04:00
rodzic 6acfadeb9b
commit 827512b225
2 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -562,7 +562,7 @@ private fun RenderNoteRow(
is AppDefinitionEvent -> RenderAppDefinition(baseNote, accountViewModel, nav)
is AudioTrackEvent -> RenderAudioTrack(baseNote, accountViewModel, nav)
is AudioHeaderEvent -> RenderAudioHeader(baseNote, accountViewModel, nav)
is DraftEvent -> RenderDraft(baseNote, backgroundColor, accountViewModel, nav)
is DraftEvent -> RenderDraft(baseNote, quotesLeft, backgroundColor, accountViewModel, nav)
is ReactionEvent -> RenderReaction(baseNote, quotesLeft, backgroundColor, accountViewModel, nav)
is RepostEvent -> RenderRepost(baseNote, quotesLeft, backgroundColor, accountViewModel, nav)
is GenericRepostEvent -> RenderRepost(baseNote, quotesLeft, backgroundColor, accountViewModel, nav)
@ -735,6 +735,7 @@ fun ObserveDraftEvent(
@Composable
fun RenderDraft(
note: Note,
quotesLeft: Int,
backgroundColor: MutableState<Color>,
accountViewModel: AccountViewModel,
nav: (String) -> Unit,
@ -748,7 +749,7 @@ fun RenderDraft(
makeItShort = false,
canPreview = true,
editState = edits,
quotesLeft = 3,
quotesLeft = quotesLeft,
unPackReply = true,
accountViewModel = accountViewModel,
nav = nav,

Wyświetl plik

@ -554,7 +554,7 @@ fun NoteMaster(
} else if (noteEvent is AppDefinitionEvent) {
RenderAppDefinition(baseNote, accountViewModel, nav)
} else if (noteEvent is DraftEvent) {
RenderDraft(baseNote, backgroundColor, accountViewModel, nav)
RenderDraft(baseNote, 3, backgroundColor, accountViewModel, nav)
} else if (noteEvent is HighlightEvent) {
DisplayHighlight(
noteEvent.quote(),