Skip to content

Commit

Permalink
Use .first() over [0]
Browse files Browse the repository at this point in the history
Cleaner syntax

Co-authored-by: TADraeseke <tdraeseke@esri.com>
  • Loading branch information
darryl-lynch and TADraeseke authored Jan 17, 2025
1 parent 6c1c7cb commit d0aecbe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class CreateAndEditGeometriesViewModel(application: Application) : AndroidViewMo
if (!geometryEditor.isStarted.value) {
if (graphicsResult != null) {
if (graphicsResult.isNotEmpty()) {
identifiedGraphic = graphicsResult[0].graphics[0]
identifiedGraphic = graphicsResult.first().graphics.first()
identifiedGraphic.isSelected = true
identifiedGraphic.geometry?.let {
geometryEditor.start(it)
Expand Down

0 comments on commit d0aecbe

Please sign in to comment.