Skip to content

Commit

Permalink
Filter null lastRead (#4865)
Browse files Browse the repository at this point in the history
  • Loading branch information
JcMinarro authored Jul 4, 2023
1 parent 26fc7fe commit 06b8f8d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ internal class MessageListItemLiveData(
// filter your own read status and sort by last read
val sortedReads = reads
.filter { it.user.id != currentUserId }
.filterNot { it.lastRead == null }
.sortedBy { it.lastRead }
.toMutableList()
if (sortedReads.isEmpty()) return messages
Expand Down

0 comments on commit 06b8f8d

Please sign in to comment.