Merge branch 'vitorpamplona:main' into kmp-completeness

This commit is contained in:
KotlinGeekDev
2026-03-23 19:52:22 +01:00
committed by GitHub
4 changed files with 12 additions and 4 deletions
@@ -53,7 +53,11 @@ fun FeedLoaded(
contentPadding = FeedPadding, contentPadding = FeedPadding,
state = listState, state = listState,
) { ) {
itemsIndexed(items.list, key = { _, item -> item.idHex }) { _, item -> itemsIndexed(
items.list,
key = { _, item -> item.idHex },
contentType = { _, item -> item.event?.kind ?: -1 },
) { _, item ->
Row(Modifier.fillMaxWidth().animateItem()) { Row(Modifier.fillMaxWidth().animateItem()) {
NoteCompose( NoteCompose(
item, item,
@@ -137,7 +137,7 @@ fun ChatFeedLoaded(
reverseLayout = true, reverseLayout = true,
state = listState, state = listState,
) { ) {
itemsIndexed(items.list, key = { _, item -> item.idHex }) { index, item -> itemsIndexed(items.list, key = { _, item -> item.idHex }, contentType = { _, item -> item.event?.kind ?: -1 }) { index, item ->
val noteEvent = item.event val noteEvent = item.event
if (avoidDraft == null || noteEvent !is DraftWrapEvent || noteEvent.dTag() !in avoidDraft.usedDraftTags) { if (avoidDraft == null || noteEvent !is DraftWrapEvent || noteEvent.dTag() !in avoidDraft.usedDraftTags) {
ChatroomMessageCompose( ChatroomMessageCompose(
@@ -313,7 +313,7 @@ fun FeedLoaded(
Spacer(StdVertSpacer) Spacer(StdVertSpacer)
} }
} }
itemsIndexed(items.list, key = { _, item -> item.idHex }) { _, item -> itemsIndexed(items.list, key = { _, item -> item.idHex }, contentType = { _, item -> item.event?.kind ?: -1 }) { _, item ->
Row( Row(
Modifier Modifier
.fillMaxWidth() .fillMaxWidth()
@@ -330,7 +330,11 @@ fun RenderThreadFeed(
contentPadding = FeedPadding, contentPadding = FeedPadding,
state = listState, state = listState,
) { ) {
itemsIndexed(items.list, key = { _, item -> item.idHex }) { index, item -> itemsIndexed(
items.list,
key = { _, item -> item.idHex },
contentType = { index, _ -> if (index == 0) "master" else "reply" },
) { index, item ->
val level = viewModel.levelFlowForItem(item).collectAsStateWithLifecycle(0) val level = viewModel.levelFlowForItem(item).collectAsStateWithLifecycle(0)
val modifier = val modifier =