1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-21 18:42:35 +01:00

Show correct reply count in dialog

This commit is contained in:
Stypox 2024-11-11 14:56:48 +01:00
parent 37d1c784fa
commit aea2b7c7f3
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23

View File

@ -116,6 +116,24 @@ private fun CommentRepliesDialog(
)
}
if (parentComment.replyCount >= 0) {
item {
Text(
modifier = Modifier.padding(
horizontal = 12.dp,
vertical = 4.dp
),
text = pluralStringResource(
R.plurals.replies,
parentComment.replyCount,
parentComment.replyCount,
),
maxLines = 1,
style = MaterialTheme.typography.titleMedium
)
}
}
if (comments.itemCount == 0) {
item {
val refresh = comments.loadState.refresh
@ -131,21 +149,6 @@ private fun CommentRepliesDialog(
}
}
} else {
if (comments.itemCount >= 0) {
item {
Text(
modifier = Modifier.padding(
horizontal = 12.dp,
vertical = 4.dp
),
text = pluralStringResource(
R.plurals.replies, comments.itemCount, comments.itemCount
),
maxLines = 1,
style = MaterialTheme.typography.titleMedium
)
}
}
items(comments.itemCount) {
Comment(
comment = comments[it]!!,