Skip to content

Commit 06f0775

Browse files
Fix detekt
1 parent 342fd28 commit 06f0775

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

WooCommerce/src/main/kotlin/com/woocommerce/android/model/SubscriptionDetailsMapper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

WooCommerce/src/main/kotlin/com/woocommerce/android/ui/products/details/ProductDetailCardBuilder.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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)

WooCommerce/src/main/kotlin/com/woocommerce/android/ui/products/details/ProductDetailViewModel.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)