mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-12 19:27:12 +01:00
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:
parent
1cdd490789
commit
ae5b3836e7
@ -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 {
|
||||
|
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user