Fix bad modifier parameter usage.
This commit is contained in:
parent
026296eb43
commit
6e65b7db86
1 changed files with 50 additions and 49 deletions
|
|
@ -121,56 +121,57 @@ fun TimelineItemEventRow(
|
||||||
inReplyToClick(inReplyToEventId)
|
inReplyToClick(inReplyToEventId)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canReply) {
|
Column(modifier = modifier.fillMaxWidth()) {
|
||||||
val dismissState = rememberDismissState(
|
if (canReply) {
|
||||||
confirmValueChange = {
|
val dismissState = rememberDismissState(
|
||||||
if (it == DismissValue.DismissedToEnd) {
|
confirmValueChange = {
|
||||||
onSwipeToReply()
|
if (it == DismissValue.DismissedToEnd) {
|
||||||
|
onSwipeToReply()
|
||||||
|
}
|
||||||
|
// Do not dismiss the message, return false!
|
||||||
|
false
|
||||||
}
|
}
|
||||||
// Do not dismiss the message, return false!
|
)
|
||||||
false
|
SwipeToDismiss(
|
||||||
}
|
state = dismissState,
|
||||||
)
|
background = {
|
||||||
SwipeToDismiss(
|
ReplySwipeIndicator({ dismissState.toSwipeProgress() })
|
||||||
state = dismissState,
|
},
|
||||||
background = {
|
directions = setOf(DismissDirection.StartToEnd),
|
||||||
ReplySwipeIndicator({ dismissState.toSwipeProgress() })
|
dismissContent = {
|
||||||
},
|
TimelineItemEventRowContent(
|
||||||
directions = setOf(DismissDirection.StartToEnd),
|
event = event,
|
||||||
dismissContent = {
|
isHighlighted = isHighlighted,
|
||||||
TimelineItemEventRowContent(
|
interactionSource = interactionSource,
|
||||||
event = event,
|
onClick = onClick,
|
||||||
isHighlighted = isHighlighted,
|
onLongClick = onLongClick,
|
||||||
interactionSource = interactionSource,
|
onTimestampClicked = onTimestampClicked,
|
||||||
onClick = onClick,
|
inReplyToClicked = ::inReplyToClicked,
|
||||||
onLongClick = onLongClick,
|
onUserDataClicked = ::onUserDataClicked,
|
||||||
onTimestampClicked = onTimestampClicked,
|
onReactionClicked = { emoji -> onReactionClick(emoji, event) },
|
||||||
inReplyToClicked = ::inReplyToClicked,
|
onMoreReactionsClicked = { onMoreReactionsClick(event) },
|
||||||
onUserDataClicked = ::onUserDataClicked,
|
)
|
||||||
onReactionClicked = { emoji -> onReactionClick(emoji, event) },
|
}
|
||||||
onMoreReactionsClicked = { onMoreReactionsClick(event) },
|
)
|
||||||
)
|
} else {
|
||||||
}
|
TimelineItemEventRowContent(
|
||||||
)
|
event = event,
|
||||||
} else {
|
isHighlighted = isHighlighted,
|
||||||
TimelineItemEventRowContent(
|
interactionSource = interactionSource,
|
||||||
event = event,
|
onClick = onClick,
|
||||||
isHighlighted = isHighlighted,
|
onLongClick = onLongClick,
|
||||||
interactionSource = interactionSource,
|
onTimestampClicked = onTimestampClicked,
|
||||||
onClick = onClick,
|
inReplyToClicked = ::inReplyToClicked,
|
||||||
onLongClick = onLongClick,
|
onUserDataClicked = ::onUserDataClicked,
|
||||||
onTimestampClicked = onTimestampClicked,
|
onReactionClicked = { emoji -> onReactionClick(emoji, event) },
|
||||||
inReplyToClicked = ::inReplyToClicked,
|
onMoreReactionsClicked = { onMoreReactionsClick(event) },
|
||||||
onUserDataClicked = ::onUserDataClicked,
|
)
|
||||||
onReactionClicked = { emoji -> onReactionClick(emoji, event) },
|
}
|
||||||
onMoreReactionsClicked = { onMoreReactionsClick(event) },
|
if (event.groupPosition.isNew()) {
|
||||||
)
|
Spacer(modifier = Modifier.height(16.dp))
|
||||||
}
|
} else {
|
||||||
// This is assuming that we are in a ColumnScope, but this is OK, for both Preview and real usage.
|
Spacer(modifier = Modifier.height(2.dp))
|
||||||
if (event.groupPosition.isNew()) {
|
}
|
||||||
Spacer(modifier = modifier.height(16.dp))
|
|
||||||
} else {
|
|
||||||
Spacer(modifier = modifier.height(2.dp))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue