File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
WooCommerce/src/main/kotlin/com/woocommerce/android Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ object SubscriptionDetailsMapper {
6363 }
6464
6565 private fun WCMetaData.extractPaymentsSyncDate (): SubscriptionPaymentSyncDate ? {
66- return when (isJson) {
66+ return when (isJson) {
6767 true -> value.stringValue.let {
6868 val jsonObject = JsonParser .parseString(it).asJsonObject
6969 val day = jsonObject[" day" ].asInt
Original file line number Diff line number Diff line change @@ -468,6 +468,7 @@ class ProductDetailCardBuilder(
468468 }
469469 }
470470
471+ @Suppress(" LongMethod" )
471472 private fun ProductAggregate.shipping (): ProductProperty ? {
472473 return if (! this .product.isVirtual && hasShipping) {
473474 val weightWithUnits = product.getWeightWithUnits(parameters.weightUnit)
Original file line number Diff line number Diff line change @@ -715,7 +715,8 @@ class ProductDetailViewModel @Inject constructor(
715715 attributeListViewState = attributeListViewState.copy(progressDialogState = ProgressDialogState .Hidden )
716716 }
717717
718- fun hasCategoryChanges () = storedProductAggregate.value?.product?.hasCategoryChanges(viewState.productDraft) ? : false
718+ fun hasCategoryChanges () = storedProductAggregate.value
719+ ?.product?.hasCategoryChanges(viewState.productDraft) ? : false
719720
720721 fun hasTagChanges () = storedProductAggregate.value?.product?.hasTagChanges(viewState.productDraft) ? : false
721722
@@ -851,7 +852,8 @@ class ProductDetailViewModel @Inject constructor(
851852 )
852853 }
853854
854- fun hasExternalLinkChanges () = storedProductAggregate.value?.product?.hasExternalLinkChanges(viewState.productDraft) ? : false
855+ fun hasExternalLinkChanges () = storedProductAggregate.value
856+ ?.product?.hasExternalLinkChanges(viewState.productDraft) ? : false
855857
856858 /* *
857859 * Called when the back= button is clicked in a product sub detail screen
@@ -1863,7 +1865,8 @@ class ProductDetailViewModel @Inject constructor(
18631865 triggerEvent(ProductNavigationTarget .RenameProductAttribute (attributeName))
18641866 }
18651867
1866- fun hasAttributeChanges () = storedProductAggregate.value?.product?.hasAttributeChanges(viewState.productDraft) ? : false
1868+ fun hasAttributeChanges () = storedProductAggregate.value
1869+ ?.product?.hasAttributeChanges(viewState.productDraft) ? : false
18671870
18681871 /* *
18691872 * Used by the add attribute screen to fetch the list of store-wide product attributes
You can’t perform that action at this time.
0 commit comments