mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 22:17:03 +05:30
Revert "fix(common): reintroduce handling for first views for comment state"
This reverts commit 1cbd3b5bd0
.
This commit is contained in:
parent
fbb13c5acf
commit
a0276c4873
1 changed files with 1 additions and 5 deletions
|
@ -67,12 +67,8 @@ internal fun createListNode(
|
|||
comments: List<Comment>,
|
||||
commentState: PostComments,
|
||||
): MutableList<CommentNode> {
|
||||
// Only check unread state if there any comments read in the first place. This somewhat restores
|
||||
// the first view behavior from when `commentState` was nullable.
|
||||
val hasUnread = commentState.commentIds.isNotEmpty()
|
||||
val isUnread =
|
||||
if (hasUnread) ({ id: String -> !commentState.commentIds.contains(id) }) else { _ -> false }
|
||||
val commentNodes = mutableListOf<CommentNode>()
|
||||
val isUnread = { id: String -> !commentState.commentIds.contains(id) }
|
||||
|
||||
for (i in comments.indices) {
|
||||
if (comments[i].parentComment == null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue