diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/adapters/CommentsRecyclerViewAdapter.java b/app/src/main/java/eu/toldi/infinityforlemmy/adapters/CommentsRecyclerViewAdapter.java index bd7a3e90..f76deac1 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/adapters/CommentsRecyclerViewAdapter.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/adapters/CommentsRecyclerViewAdapter.java @@ -443,9 +443,15 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter(); in.readTypedList(children, Comment.CREATOR); moreChildrenIds = new ArrayList<>(); @@ -451,6 +455,8 @@ public class Comment implements Parcelable { parcel.writeByte((byte) (hasReply ? 1 : 0)); parcel.writeByte((byte) (isExpanded ? 1 : 0)); parcel.writeByte((byte) (hasExpandedBefore ? 1 : 0)); + parcel.writeByte((byte) (isDeleted ? 1 : 0)); + parcel.writeByte((byte) (isRemoved ? 1 : 0)); parcel.writeTypedList(children); List childrenIds = new ArrayList<>(); if (moreChildrenIds != null) { @@ -492,4 +498,16 @@ public class Comment implements Parcelable { public BasicUserInfo getAuthor() { return author; } + + public boolean isRemoved() { + return isRemoved; + } + + public boolean isDeleted() { + return isDeleted; + } + + public String getDistinguished() { + return distinguished; + } } diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/comment/ParseComment.java b/app/src/main/java/eu/toldi/infinityforlemmy/comment/ParseComment.java index 8017c8eb..37a03682 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/comment/ParseComment.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/comment/ParseComment.java @@ -357,11 +357,12 @@ public class ParseComment { boolean hasReply = countsObj.getInt("child_count") > 0; boolean saved = jsonObject.getBoolean("saved"); boolean deleted = commentObj.getBoolean("deleted"); + boolean removed = commentObj.getBoolean("removed"); long edited = 0; BasicUserInfo authorInfo = new BasicUserInfo(creatorObj.getInt("id"), author, authorQualifiedName, creatorObj.optString("avatar", ""), creatorObj.optString("display_name", author)); Comment comment = new Comment(id, postID, authorInfo, linkAuthor, commentTimeMillis, commentMarkdown, commentRawText, linkId, communityName, communityQualifiedName, parentId, - downvotes, upvotes, voteType, isSubmitter, distinguished, permalink, depth, collapsed, hasReply, saved, deleted, edited, path); + downvotes, upvotes, voteType, isSubmitter, distinguished, permalink, depth, collapsed, hasReply, saved, deleted,removed, edited, path); int child_count = countsObj.getInt("child_count"); comment.setChildCount(child_count); comment.setAuthorIconUrl(authorAvatar); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ebe9518f..f9904bed 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1332,4 +1332,6 @@ Instance unblocked! Don\'t hide saved read posts automatically Don\'t hide your own read posts automatically + deleted by creator + removed by moderator \ No newline at end of file