mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-27 18:14:45 +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());
|
CommentInteraction message = getItem(holder.getBindingAdapterPosition());
|
||||||
if (message != null) {
|
if (message != null) {
|
||||||
|
|
||||||
if (message.isRead()) {
|
if (!message.isRead()) {
|
||||||
if (markAllMessagesAsRead) {
|
if (markAllMessagesAsRead) {
|
||||||
message.markAsRead();
|
message.markAsRead();
|
||||||
} else {
|
} else {
|
||||||
|
@ -31,7 +31,7 @@ public class FetchCommentInteractions {
|
|||||||
for (int i = 0; i < jsonArray.length(); i++) {
|
for (int i = 0; i < jsonArray.length(); i++) {
|
||||||
JSONObject commentInteractionObject = jsonArray.getJSONObject(i);
|
JSONObject commentInteractionObject = jsonArray.getJSONObject(i);
|
||||||
Comment comment = ParseComment.parseSingleComment(commentInteractionObject);
|
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");
|
int id = commentInteractionObject.getJSONObject("comment_reply").getInt("id");
|
||||||
commentInteractions.add(new CommentInteraction(id, comment, isRead));
|
commentInteractions.add(new CommentInteraction(id, comment, isRead));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user