Skip to content

Commit

Permalink
Address some PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
squarejesse committed Sep 29, 2023
1 parent 8acf043 commit db749b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class LazyListTest {
assertThat(snapshot)
.containsExactly(
DefaultLazyListValue.copy(
placeholder = List(20) { TextValue(Modifier, "Placeholder") },
placeholder = List(30) { TextValue(Modifier, "Placeholder") },
),
)
}
Expand Down Expand Up @@ -91,7 +91,7 @@ class LazyListTest {
.containsExactly(
DefaultLazyListValue.copy(
itemsAfter = expectedItemsAfter,
placeholder = List(20) { TextValue(Modifier, "Placeholder") },
placeholder = List(30) { TextValue(Modifier, "Placeholder") },
items = List(expectedItemCount) { TextValue(Modifier, it.toString()) },
),
)
Expand Down Expand Up @@ -124,7 +124,7 @@ class LazyListTest {
DefaultLazyListValue.copy(
itemsBefore = 35,
itemsAfter = 25,
placeholder = List(20) { TextValue(Modifier, "Placeholder") },
placeholder = List(30) { TextValue(Modifier, "Placeholder") },
items = List(40) { TextValue(Modifier, (it + 35).toString()) },
),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ internal open class UIViewLazyList(
override fun tableView(
tableView: UITableView,
numberOfRowsInSection: NSInteger,
) = processor.size.toLong()
): Long {
require(numberOfRowsInSection == 0L)
return processor.size.toLong()
}

override fun tableView(
tableView: UITableView,
Expand Down Expand Up @@ -146,7 +149,6 @@ internal open class UIViewLazyList(
delegate = tableViewDelegate
prefetchingEnabled = true
rowHeight = UITableViewAutomaticDimension
estimatedRowHeight = 44.0
separatorStyle = UITableViewCellSeparatorStyleNone

registerClass(
Expand Down

0 comments on commit db749b2

Please sign in to comment.