From 2d25059b85b72dd381d5360b21ba1cb2cd6fff94 Mon Sep 17 00:00:00 2001 From: ThomazFB Date: Thu, 12 Dec 2024 15:41:17 -0300 Subject: [PATCH] Rename PackageSelectionState property --- .../WooShippingLabelCreationViewModel.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/WooShippingLabelCreationViewModel.kt b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/WooShippingLabelCreationViewModel.kt index 36f4e05ccd5..ee45e37e31a 100644 --- a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/WooShippingLabelCreationViewModel.kt +++ b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/WooShippingLabelCreationViewModel.kt @@ -50,12 +50,12 @@ class WooShippingLabelCreationViewModel @Inject constructor( private val selectedRatesSortOrder = MutableStateFlow(ShippingSortOption.FASTEST) private val refreshShippingRates = MutableSharedFlow() - private val selectedPackage = MutableStateFlow(NotSelected) + private val packageSelection = MutableStateFlow(NotSelected) @OptIn(ExperimentalCoroutinesApi::class) private val shippingRates = combine( - selectedPackage, + packageSelection, selectedRatesSortOrder, refreshShippingRates.onStart { emit(Unit) } ) { selectedPackage, sortOrder, _ -> @@ -93,7 +93,7 @@ class WooShippingLabelCreationViewModel @Inject constructor( flowOf(orderDetailRepository.getOrderById(navArgs.orderId)), observeOriginAddresses(), shippingRates, - selectedPackage + packageSelection ) { storeOptions, order, originAddresses, shippingRates, packageSelection -> val selectedOriginAddress = getSelectedOriginAddress(originAddresses) if (order == null || selectedOriginAddress == null) { @@ -195,7 +195,7 @@ class WooShippingLabelCreationViewModel @Inject constructor( } fun onPackageSelected(packageData: PackageData) { - selectedPackage.update { content -> + packageSelection.update { content -> when (content) { is NotSelected -> PackageSelectionState.Data( selectedPackage = packageData,