You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit refactors the calculation of the total number of items in the cart.
Previously, the total item count was calculated independently in both the Android `CartScreen.kt` and iOS `CartView.swift`.
This change moves the calculation into the shared `CartViewModel.kt`. A new `totalItemCount` property is added to `CartUiState`, which is now populated within the `map` function that transforms the `repository.cartDetails` flow.
This centralization simplifies the UI components and ensures consistency in how the total item count is determined across platforms.
0 commit comments