Browse Source

fix todoapp-lite iOS (#2844)

pull/2813/merge
dima.avdeev 2 years ago committed by GitHub
parent
commit
aff9f0d285
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      experimental/examples/todoapp-lite/shared/src/commonMain/kotlin/example/todoapp/lite/common/RootContent.kt

4
experimental/examples/todoapp-lite/shared/src/commonMain/kotlin/example/todoapp/lite/common/RootContent.kt

@ -34,5 +34,5 @@ internal fun RootContent(modifier: Modifier = Modifier) {
private val RootState.editingItem: TodoItem?
get() = editingItemId?.let(items::firstById)
private fun List<TodoItem>.firstById(id: Long): TodoItem =
first { it.id == id }
private fun List<TodoItem>.firstById(id: Long): TodoItem? =
firstOrNull { it.id == id }

Loading…
Cancel
Save