File tree 2 files changed +9
-5
lines changed
androidTest/kotlin/net/mullvad/mullvadvpn/compose/dialog
main/kotlin/net/mullvad/mullvadvpn/compose/dialog
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ class MtuDialogTest {
125
125
val mockedClickHandler: () -> Unit = mockk(relaxed = true )
126
126
setContentWithTheme {
127
127
testMtuDialog(
128
+ mtuInitial = VALID_DUMMY_MTU_VALUE ,
128
129
onResetMtu = mockedClickHandler,
129
130
)
130
131
}
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import com.ramcosta.composedestinations.navigation.DestinationsNavigator
18
18
import com.ramcosta.composedestinations.navigation.EmptyDestinationsNavigator
19
19
import com.ramcosta.composedestinations.spec.DestinationStyle
20
20
import net.mullvad.mullvadvpn.R
21
+ import net.mullvad.mullvadvpn.compose.button.NegativeButton
21
22
import net.mullvad.mullvadvpn.compose.button.PrimaryButton
22
23
import net.mullvad.mullvadvpn.compose.textfield.MtuTextField
23
24
import net.mullvad.mullvadvpn.compose.util.LaunchedEffectCollect
@@ -119,11 +120,13 @@ fun MtuDialog(
119
120
}
120
121
)
121
122
122
- PrimaryButton (
123
- modifier = Modifier .fillMaxWidth(),
124
- text = stringResource(R .string.reset_to_default_button),
125
- onClick = onResetMtu
126
- )
123
+ if (mtuInitial != null ) {
124
+ NegativeButton (
125
+ modifier = Modifier .fillMaxWidth(),
126
+ text = stringResource(R .string.reset_to_default_button),
127
+ onClick = onResetMtu
128
+ )
129
+ }
127
130
128
131
PrimaryButton (
129
132
modifier = Modifier .fillMaxWidth(),
You can’t perform that action at this time.
0 commit comments