cleaner code, change cascading ifs to when
This commit is contained in:
+4
-15
@@ -483,21 +483,10 @@ private fun FullBleedNoteCompose(
|
|||||||
Spacer(modifier = Modifier.height(10.dp))
|
Spacer(modifier = Modifier.height(10.dp))
|
||||||
|
|
||||||
when (noteEvent) {
|
when (noteEvent) {
|
||||||
is BadgeDefinitionEvent -> {
|
is BadgeDefinitionEvent -> BadgeDisplay(baseNote = baseNote)
|
||||||
BadgeDisplay(baseNote = baseNote)
|
is LongTextNoteEvent -> RenderLongFormHeaderForThread(noteEvent)
|
||||||
}
|
is WikiNoteEvent -> RenderWikiHeaderForThread(noteEvent, accountViewModel, nav)
|
||||||
|
is ClassifiedsEvent -> RenderClassifiedsReaderForThread(noteEvent, baseNote, accountViewModel, nav)
|
||||||
is LongTextNoteEvent -> {
|
|
||||||
RenderLongFormHeaderForThread(noteEvent)
|
|
||||||
}
|
|
||||||
|
|
||||||
is WikiNoteEvent -> {
|
|
||||||
RenderWikiHeaderForThread(noteEvent, accountViewModel, nav)
|
|
||||||
}
|
|
||||||
|
|
||||||
is ClassifiedsEvent -> {
|
|
||||||
RenderClassifiedsReaderForThread(noteEvent, baseNote, accountViewModel, nav)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
|
|||||||
Reference in New Issue
Block a user