评论区UI调整
This commit is contained in:
@@ -692,19 +692,19 @@ fun CommentContent(
|
||||
// }
|
||||
// return
|
||||
// }
|
||||
if (commentsPagging.loadState.append is LoadState.Loading) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.height(64.dp),
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
LinearProgressIndicator(
|
||||
modifier = Modifier.width(160.dp),
|
||||
color = AppColors.main
|
||||
)
|
||||
}
|
||||
}
|
||||
// if (commentsPagging.loadState.append is LoadState.Loading) {
|
||||
// Box(
|
||||
// modifier = Modifier
|
||||
// .fillMaxSize()
|
||||
// .height(64.dp),
|
||||
// contentAlignment = Alignment.Center
|
||||
// ) {
|
||||
// LinearProgressIndicator(
|
||||
// modifier = Modifier.width(160.dp),
|
||||
// color = AppColors.main
|
||||
// )
|
||||
// }
|
||||
// }
|
||||
if (commentsPagging.loadState.refresh is LoadState.Error) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
@@ -737,6 +737,40 @@ fun CommentContent(
|
||||
)
|
||||
}
|
||||
}
|
||||
// 评论为空
|
||||
if (commentsPagging.itemCount == 0 && commentsPagging.loadState.refresh is LoadState.NotLoading && addedTopLevelComment.isEmpty()) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.padding(top = 1.dp),
|
||||
contentAlignment = Alignment.TopCenter
|
||||
) {
|
||||
Column(
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
) {
|
||||
Image(
|
||||
painter = painterResource(id = R.mipmap.qs_plq_qs_img),
|
||||
contentDescription = null,
|
||||
modifier = Modifier.size(181.dp)
|
||||
)
|
||||
Spacer(modifier = Modifier.size(24.dp))
|
||||
androidx.compose.material.Text(
|
||||
text = "没有人说话…",
|
||||
color = AppColors.text,
|
||||
fontSize = 16.sp,
|
||||
fontWeight = FontWeight.W600
|
||||
)
|
||||
Spacer(modifier = Modifier.size(8.dp))
|
||||
androidx.compose.material.Text(
|
||||
text = "留下评论,等AI和朋友回应你吧",
|
||||
color = AppColors.secondaryText,
|
||||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.W400
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
|
||||
Reference in New Issue
Block a user