@@ -2,7 +2,6 @@ package net.mullvad.mullvadvpn.compose.cell
2
2
3
3
import androidx.compose.foundation.layout.Row
4
4
import androidx.compose.foundation.layout.padding
5
- import androidx.compose.foundation.layout.size
6
5
import androidx.compose.foundation.layout.wrapContentHeight
7
6
import androidx.compose.foundation.layout.wrapContentWidth
8
7
import androidx.compose.material3.Icon
@@ -13,13 +12,14 @@ import androidx.compose.runtime.Composable
13
12
import androidx.compose.ui.Alignment
14
13
import androidx.compose.ui.Modifier
15
14
import androidx.compose.ui.draw.alpha
15
+ import androidx.compose.ui.focus.focusProperties
16
16
import androidx.compose.ui.res.painterResource
17
17
import androidx.compose.ui.res.stringResource
18
18
import androidx.compose.ui.text.font.FontWeight
19
19
import androidx.compose.ui.tooling.preview.Preview
20
20
import androidx.core.text.HtmlCompat
21
21
import net.mullvad.mullvadvpn.R
22
- import net.mullvad.mullvadvpn.compose.component.ChevronView
22
+ import net.mullvad.mullvadvpn.compose.component.ChevronButton
23
23
import net.mullvad.mullvadvpn.compose.component.textResource
24
24
import net.mullvad.mullvadvpn.compose.extensions.toAnnotatedString
25
25
import net.mullvad.mullvadvpn.lib.theme.AppTheme
@@ -53,6 +53,7 @@ fun ExpandableComposeCell(
53
53
val bodyViewModifier = Modifier
54
54
55
55
BaseCell (
56
+ modifier = Modifier .focusProperties { canFocus = false },
56
57
title = {
57
58
BaseCellTitle (
58
59
title = title,
@@ -64,6 +65,7 @@ fun ExpandableComposeCell(
64
65
ExpandableComposeCellBody (
65
66
isExpanded = isExpanded,
66
67
modifier = bodyViewModifier,
68
+ onExpand = onCellClicked,
67
69
onInfoClicked = onInfoClicked
68
70
)
69
71
},
@@ -75,6 +77,7 @@ fun ExpandableComposeCell(
75
77
private fun ExpandableComposeCellBody (
76
78
isExpanded : Boolean ,
77
79
modifier : Modifier ,
80
+ onExpand : ((Boolean ) -> Unit ),
78
81
onInfoClicked : (() -> Unit )? = null
79
82
) {
80
83
Row (
@@ -96,9 +99,9 @@ private fun ExpandableComposeCellBody(
96
99
}
97
100
}
98
101
99
- ChevronView (
102
+ ChevronButton (
100
103
isExpanded = isExpanded,
101
- modifier = Modifier .size( Dimens .expandableCellChevronSize)
104
+ onExpand = onExpand,
102
105
)
103
106
}
104
107
}
0 commit comments