Last active
December 12, 2023 11:17
-
-
Save yigitozgumus/cd738f7ff478ad10e0b9bafcdc454f42 to your computer and use it in GitHub Desktop.
Example MVVM Violation
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
override fun showVariantSelectionDialog(pageType: String) { | |
// Direct data access | |
val product = productDetailViewModel.getProduct() | |
if (product == null) { | |
showProductDetailErrorDialog() | |
return | |
} | |
variantSelectionDialogProvider.provideVariantSelectionDialog( | |
content = getVariantSelectionContent(product, pageType), | |
anyVariantSelectedListener = { | |
// Internal Logic | |
}, | |
addToBasketClickedListener = { | |
// Internal Logic | |
}, | |
).show(childFragmentManager, VariantSelectionDialogProvider.TAG) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment