Fix potential cast exception

when casting to `Spannable` in `CommentTextOnTouchListener`
This commit is contained in:
devlearner 2022-10-04 17:31:35 +08:00 committed by GitHub
parent a291bfcc4a
commit c7a98b9ca8

View file

@ -115,7 +115,7 @@ public class CommentsMiniInfoItemHolder extends InfoItemHolder {
itemContentView.setLines(COMMENT_DEFAULT_LINES);
commentText = item.getCommentText();
itemContentView.setText(commentText);
itemContentView.setText(commentText, TextView.BufferType.SPANNABLE);
itemContentView.setOnTouchListener(CommentTextOnTouchListener.INSTANCE);
if (itemContentView.getLineCount() == 0) {