Skip to content

Commit c3694dd

Browse files
committed
Fixed formatting
1 parent 5e8b051 commit c3694dd

File tree

1 file changed

+31
-20
lines changed

1 file changed

+31
-20
lines changed

WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/settings/details/store/WooPosSettingsStoreRepository.kt

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,29 +24,40 @@ class WooPosSettingsStoreRepository @Inject constructor(
2424
)
2525
}
2626

27+
@Suppress("CyclomaticComplexMethod")
2728
private fun buildStoreAddress(settings: Settings?): String {
2829
return buildString {
2930
settings?.address?.let { if (it.isNotBlank()) append(it) }
30-
settings?.address2?.let { if (it.isNotBlank()) {
31-
if (isNotEmpty()) append(", ")
32-
append(it)
33-
} }
34-
settings?.city?.let { if (it.isNotBlank()) {
35-
if (isNotEmpty()) append(", ")
36-
append(it)
37-
} }
38-
settings?.stateCode?.let { if (it.isNotBlank()) {
39-
if (isNotEmpty()) append(", ")
40-
append(it)
41-
} }
42-
settings?.postalCode?.let { if (it.isNotBlank()) {
43-
if (isNotEmpty()) append(" ")
44-
append(it)
45-
} }
46-
settings?.countryCode?.let { if (it.isNotBlank()) {
47-
if (isNotEmpty()) append(", ")
48-
append(it)
49-
} }
31+
settings?.address2?.let {
32+
if (it.isNotBlank()) {
33+
if (isNotEmpty()) append(", ")
34+
append(it)
35+
}
36+
}
37+
settings?.city?.let {
38+
if (it.isNotBlank()) {
39+
if (isNotEmpty()) append(", ")
40+
append(it)
41+
}
42+
}
43+
settings?.stateCode?.let {
44+
if (it.isNotBlank()) {
45+
if (isNotEmpty()) append(", ")
46+
append(it)
47+
}
48+
}
49+
settings?.postalCode?.let {
50+
if (it.isNotBlank()) {
51+
if (isNotEmpty()) append(" ")
52+
append(it)
53+
}
54+
}
55+
settings?.countryCode?.let {
56+
if (it.isNotBlank()) {
57+
if (isNotEmpty()) append(", ")
58+
append(it)
59+
}
60+
}
5061
}.ifBlank { "" }
5162
}
5263
}

0 commit comments

Comments
 (0)