Fix unread message highlight in inbox

Previously, the mentions where incorrectly highlighted as unread in the Inbox activity (the read/unread messages were inverted). This commit fixes this issue.
This commit is contained in:
Bazsalanszky 2024-07-09 11:08:47 +02:00
parent 1cdd490789
commit ae5b3836e7
2 changed files with 2 additions and 2 deletions

View File

@ -156,7 +156,7 @@ public class MessageRecyclerViewAdapter extends PagedListAdapter<CommentInteract
CommentInteraction message = getItem(holder.getBindingAdapterPosition());
if (message != null) {
if (message.isRead()) {
if (!message.isRead()) {
if (markAllMessagesAsRead) {
message.markAsRead();
} else {

View File

@ -31,7 +31,7 @@ public class FetchCommentInteractions {
for (int i = 0; i < jsonArray.length(); i++) {
JSONObject commentInteractionObject = jsonArray.getJSONObject(i);
Comment comment = ParseComment.parseSingleComment(commentInteractionObject);
boolean isRead = !commentInteractionObject.getJSONObject("comment_reply").getBoolean("read");
boolean isRead = commentInteractionObject.getJSONObject("comment_reply").getBoolean("read");
int id = commentInteractionObject.getJSONObject("comment_reply").getInt("id");
commentInteractions.add(new CommentInteraction(id, comment, isRead));
}