Created
July 31, 2020 10:10
-
-
Save mnewlive/92c6aa48d87da02653a531d6f0a3253c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun updateListItem(viewModel: ConnectionViewModel) { | |
data.mapIndexed { index, any -> index to (any as ConnectionViewModel) } | |
.firstOrNull { it.second.guid == viewModel.guid }?.let { (itemIndex, _) -> | |
updateItem(viewModel, itemIndex) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment