Skip to content

Instantly share code, notes, and snippets.

@mr5z
Last active October 23, 2020 11:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mr5z/bbd76500c887b29acc8dd8a0d4c5a1c4 to your computer and use it in GitHub Desktop.
Save mr5z/bbd76500c887b29acc8dd8a0d4c5a1c4 to your computer and use it in GitHub Desktop.
weird
// This one throws
buildColorPicker().apply {
enableAutoClose()
setCallback { color ->
model.map.color = color
mapView.invalidate()
}
show()
}
// This doesn't
buildColorPicker().let {
it.enableAutoClose()
it.setCallback { color ->
model.map.color = color
mapView.invalidate()
}
it.show()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment