|
11 | 11 | import android.widget.Button; |
12 | 12 | import android.widget.ImageButton; |
13 | 13 | import android.widget.ImageView; |
| 14 | +import android.widget.LinearLayout; |
14 | 15 | import android.widget.PopupMenu; |
15 | 16 | import android.widget.ProgressBar; |
16 | 17 | import android.widget.TextView; |
@@ -103,24 +104,14 @@ public CommentViewHolder(Context context, FastCommentsSDK sdk, @NonNull View ite |
103 | 104 | private boolean liveChatStyle = false; |
104 | 105 |
|
105 | 106 | /** |
106 | | - * Set whether to use live chat styling (smaller avatars, hidden dates) |
| 107 | + * Set whether this view is using live chat styling |
107 | 108 | * @param liveChatStyle True for live chat style |
108 | 109 | */ |
109 | 110 | public void setLiveChatStyle(boolean liveChatStyle) { |
110 | 111 | this.liveChatStyle = liveChatStyle; |
111 | 112 |
|
112 | | - // Update avatar size |
113 | | - ViewGroup.LayoutParams avatarParams = avatarImageView.getLayoutParams(); |
114 | | - if (liveChatStyle) { |
115 | | - // Smaller avatar for live chat |
116 | | - avatarParams.width = (int) (context.getResources().getDisplayMetrics().density * 28); |
117 | | - avatarParams.height = (int) (context.getResources().getDisplayMetrics().density * 28); |
118 | | - } else { |
119 | | - // Regular avatar size |
120 | | - avatarParams.width = (int) (context.getResources().getDisplayMetrics().density * 40); |
121 | | - avatarParams.height = (int) (context.getResources().getDisplayMetrics().density * 40); |
122 | | - } |
123 | | - avatarImageView.setLayoutParams(avatarParams); |
| 113 | + // No need to modify the view since we're using different layouts |
| 114 | + // Just store the flag for other behavior adjustments |
124 | 115 | } |
125 | 116 |
|
126 | 117 | public void setComment(final RenderableComment comment, boolean disableUnverifiedLabel, final CommentsAdapter.OnToggleRepliesListener listener) { |
@@ -189,6 +180,8 @@ public void setComment(final RenderableComment comment, boolean disableUnverifie |
189 | 180 | // Display the comment content with clickable links |
190 | 181 | String htmlContent = comment.getComment().getCommentHTML(); |
191 | 182 | contentTextView.setText(HtmlLinkHandler.parseHtml(context, htmlContent, contentTextView)); |
| 183 | + |
| 184 | + // No need for special handling for live chat - we're using a dedicated layout |
192 | 185 |
|
193 | 186 | // Indent child comments to reflect hierarchy |
194 | 187 | ViewGroup.MarginLayoutParams itemViewLayoutParams = (ViewGroup.MarginLayoutParams) itemView.getLayoutParams(); |
|
0 commit comments