From f9dae9078e4d091906f1e82ced9acf5b15045379 Mon Sep 17 00:00:00 2001 From: Isira Seneviratne Date: Sun, 4 Aug 2024 05:07:55 +0530 Subject: [PATCH] Always show comment thumbnails, even if placeholders --- .../newpipe/ui/components/comment/Comment.kt | 30 +++++++++---------- .../comment/CommentRepliesHeader.kt | 20 ++++++------- 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/ui/components/comment/Comment.kt b/app/src/main/java/org/schabi/newpipe/ui/components/comment/Comment.kt index 8ecc87fdd..d01f3550c 100644 --- a/app/src/main/java/org/schabi/newpipe/ui/components/comment/Comment.kt +++ b/app/src/main/java/org/schabi/newpipe/ui/components/comment/Comment.kt @@ -66,22 +66,20 @@ fun Comment(comment: CommentsInfoItem) { .padding(8.dp), horizontalArrangement = Arrangement.spacedBy(8.dp) ) { - if (ImageStrategy.shouldLoadImages()) { - AsyncImage( - model = ImageStrategy.choosePreferredImage(comment.uploaderAvatars), - contentDescription = null, - placeholder = painterResource(R.drawable.placeholder_person), - error = painterResource(R.drawable.placeholder_person), - modifier = Modifier - .size(42.dp) - .clip(CircleShape) - .clickable { - NavigationHelper.openCommentAuthorIfPresent( - context as FragmentActivity, comment - ) - } - ) - } + AsyncImage( + model = ImageStrategy.choosePreferredImage(comment.uploaderAvatars), + contentDescription = null, + placeholder = painterResource(R.drawable.placeholder_person), + error = painterResource(R.drawable.placeholder_person), + modifier = Modifier + .size(42.dp) + .clip(CircleShape) + .clickable { + NavigationHelper.openCommentAuthorIfPresent( + context as FragmentActivity, comment + ) + } + ) Column(verticalArrangement = Arrangement.spacedBy(4.dp)) { Row(horizontalArrangement = Arrangement.spacedBy(4.dp)) { diff --git a/app/src/main/java/org/schabi/newpipe/ui/components/comment/CommentRepliesHeader.kt b/app/src/main/java/org/schabi/newpipe/ui/components/comment/CommentRepliesHeader.kt index a8e33a49d..920300f2c 100644 --- a/app/src/main/java/org/schabi/newpipe/ui/components/comment/CommentRepliesHeader.kt +++ b/app/src/main/java/org/schabi/newpipe/ui/components/comment/CommentRepliesHeader.kt @@ -51,17 +51,15 @@ fun CommentRepliesHeader(comment: CommentsInfoItem) { horizontalArrangement = Arrangement.spacedBy(8.dp), verticalAlignment = Alignment.CenterVertically ) { - if (ImageStrategy.shouldLoadImages()) { - AsyncImage( - model = ImageStrategy.choosePreferredImage(comment.uploaderAvatars), - contentDescription = null, - placeholder = painterResource(R.drawable.placeholder_person), - error = painterResource(R.drawable.placeholder_person), - modifier = Modifier - .size(42.dp) - .clip(CircleShape) - ) - } + AsyncImage( + model = ImageStrategy.choosePreferredImage(comment.uploaderAvatars), + contentDescription = null, + placeholder = painterResource(R.drawable.placeholder_person), + error = painterResource(R.drawable.placeholder_person), + modifier = Modifier + .size(42.dp) + .clip(CircleShape) + ) Column { Text(text = comment.uploaderName)