-
-
Save kshvkantg/706b6d74d09b608b75e0df78c8b32517 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
private fun providePropertyChangedCallback(): OnPropertyChangedCallback { | |
return object : OnPropertyChangedCallback() | |
override fun onPropertyChanged(sender: Observable?, propertyId: Int) { | |
val product = sender as Product | |
viewModel.setDataMediatorValue ( | |
!(product.quantity == null || product.quantity == 0 || | |
product.weight.isNullOrEmpty() || | |
(product.weight ?: "0.00").toDouble() == 0.00 | |
) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment