Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
westnordost committed Apr 28, 2024
2 parents 1049801 + 7f232f1 commit aae003b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import de.westnordost.streetcomplete.osm.lit.LitStatus
import de.westnordost.streetcomplete.osm.lit.LitStatus.AUTOMATIC
import de.westnordost.streetcomplete.osm.lit.LitStatus.NIGHT_AND_DAY
import de.westnordost.streetcomplete.osm.lit.LitStatus.NO
import de.westnordost.streetcomplete.osm.lit.LitStatus.UNSUPPORTED
import de.westnordost.streetcomplete.osm.lit.LitStatus.YES
import de.westnordost.streetcomplete.osm.lit.applyTo
import de.westnordost.streetcomplete.osm.lit.asItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,11 @@ class EditHistoryViewModelImpl(

override fun select(editKey: EditKey?) {
selectedEdit.value =
if (editKey != null) edits.value.firstOrNull { it.key == editKey }
else null
if (editKey != null) {
edits.value.firstOrNull { it.key == editKey }
} else {
null
}
}

override fun undo(editKey: EditKey) {
Expand Down

0 comments on commit aae003b

Please sign in to comment.