Skip to content

Commit ebd5b97

Browse files
authored
Merge pull request #14829 from woocommerce/issue/woomob-1544-woo-poslocal-catalog-local-catalog-settings-toogle-bug
[WOOMOB-1544] Fix POS Local Catalog settings toggle clickable area
2 parents d970832 + 7a63315 commit ebd5b97

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/settings/details/localcatalog/WooPosSettingsLocalCatalogScreen.kt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.woocommerce.android.ui.woopos.settings.details.localcatalog
22

33
import androidx.compose.foundation.Image
44
import androidx.compose.foundation.background
5+
import androidx.compose.foundation.clickable
56
import androidx.compose.foundation.layout.Arrangement
67
import androidx.compose.foundation.layout.Column
78
import androidx.compose.foundation.layout.Row
@@ -173,7 +174,13 @@ private fun SettingsSection(
173174
Spacer(modifier = Modifier.height(WooPosSpacing.Medium.value))
174175

175176
Row(
176-
modifier = Modifier.fillMaxWidth(),
177+
modifier = Modifier
178+
.fillMaxWidth()
179+
.clip(RoundedCornerShape(WooPosCornerRadius.Medium.value))
180+
.clickable(enabled = !isLoading) {
181+
onToggleCellularData(!allowCellularDataUpdate)
182+
}
183+
.padding(WooPosSpacing.Small.value),
177184
horizontalArrangement = Arrangement.SpaceBetween,
178185
verticalAlignment = Alignment.CenterVertically
179186
) {
@@ -195,7 +202,7 @@ private fun SettingsSection(
195202

196203
Switch(
197204
checked = allowCellularDataUpdate,
198-
onCheckedChange = { onToggleCellularData(it) },
205+
onCheckedChange = null, // Disable direct interaction since the entire row is clickable
199206
enabled = !isLoading,
200207
colors = SwitchDefaults.colors(
201208
checkedThumbColor = MaterialTheme.colorScheme.primary,

0 commit comments

Comments
 (0)