fix #6 修正了创建新的评论后,评论区重复显示评论的问题
This commit is contained in:
@@ -518,7 +518,10 @@ fun CommentContent(
|
|||||||
|
|
||||||
for (idx in 0 until commentsPagging.itemCount) {
|
for (idx in 0 until commentsPagging.itemCount) {
|
||||||
val item = commentsPagging[idx] ?: return
|
val item = commentsPagging[idx] ?: return
|
||||||
if (item.id != viewModel.highlightCommentId) {
|
if (
|
||||||
|
item.id != viewModel.highlightCommentId &&
|
||||||
|
viewModel.addedCommentList.none { it.id == item.id }
|
||||||
|
) {
|
||||||
AnimatedVisibility(
|
AnimatedVisibility(
|
||||||
visible = true,
|
visible = true,
|
||||||
enter = slideInVertically(),
|
enter = slideInVertically(),
|
||||||
@@ -939,11 +942,13 @@ fun PostImageView(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
.background(Color.Gray.copy(alpha = 0.1f)),
|
.background(Color.Gray.copy(alpha = 0.1f)),
|
||||||
flingBehavior = PagerDefaults.flingBehavior(state = pagerState,
|
flingBehavior = PagerDefaults.flingBehavior(
|
||||||
|
state = pagerState,
|
||||||
snapAnimationSpec = spring(
|
snapAnimationSpec = spring(
|
||||||
dampingRatio = Spring.DampingRatioNoBouncy,
|
dampingRatio = Spring.DampingRatioNoBouncy,
|
||||||
stiffness = Spring.StiffnessMedium,
|
stiffness = Spring.StiffnessMedium,
|
||||||
))
|
)
|
||||||
|
)
|
||||||
|
|
||||||
) { page ->
|
) { page ->
|
||||||
val image = images[page]
|
val image = images[page]
|
||||||
|
|||||||
Reference in New Issue
Block a user