Fix CommentorURL NPE and wrong substring.

This commit is contained in:
FireMasterK 2021-08-12 22:57:16 +05:30
parent 0c4856933b
commit a0c5898f4d
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD

View File

@ -487,7 +487,7 @@ public class ResponseHelper {
info.getRelatedItems().forEach(comment -> {
comments.add(new Comment(comment.getUploaderName(), rewriteURL(comment.getUploaderAvatarUrl()),
comment.getCommentId(), comment.getCommentText(), comment.getTextualUploadDate(),
optionalSubstring(comment.getUploaderUrl(), 19), comment.getLikeCount(),
optionalSubstring(comment.getUploaderUrl(), 23), comment.getLikeCount(),
comment.isHeartedByUploader(), comment.isPinned(), comment.isUploaderVerified()));
});
@ -516,8 +516,8 @@ public class ResponseHelper {
info.getItems().forEach(comment -> {
comments.add(new Comment(comment.getUploaderName(), rewriteURL(comment.getUploaderAvatarUrl()),
comment.getCommentId(), comment.getCommentText(), comment.getTextualUploadDate(),
comment.getUploaderUrl().substring(19), comment.getLikeCount(), comment.isHeartedByUploader(),
comment.isPinned(), comment.isUploaderVerified()));
optionalSubstring(comment.getUploaderUrl(), 23), comment.getLikeCount(),
comment.isHeartedByUploader(), comment.isPinned(), comment.isUploaderVerified()));
});
String nextpage = null;