diff --git a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/dialog/MtuDialogTest.kt b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/dialog/MtuDialogTest.kt index 26babe92454d..0641998f9bd1 100644 --- a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/dialog/MtuDialogTest.kt +++ b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/dialog/MtuDialogTest.kt @@ -125,6 +125,7 @@ class MtuDialogTest { val mockedClickHandler: () -> Unit = mockk(relaxed = true) setContentWithTheme { testMtuDialog( + mtuInitial = VALID_DUMMY_MTU_VALUE, onResetMtu = mockedClickHandler, ) } diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/MtuDialog.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/MtuDialog.kt index e4a790fdb44f..4644a1aa952a 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/MtuDialog.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/MtuDialog.kt @@ -18,6 +18,7 @@ import com.ramcosta.composedestinations.navigation.DestinationsNavigator import com.ramcosta.composedestinations.navigation.EmptyDestinationsNavigator import com.ramcosta.composedestinations.spec.DestinationStyle import net.mullvad.mullvadvpn.R +import net.mullvad.mullvadvpn.compose.button.NegativeButton import net.mullvad.mullvadvpn.compose.button.PrimaryButton import net.mullvad.mullvadvpn.compose.textfield.MtuTextField import net.mullvad.mullvadvpn.compose.util.LaunchedEffectCollect @@ -119,11 +120,13 @@ fun MtuDialog( } ) - PrimaryButton( - modifier = Modifier.fillMaxWidth(), - text = stringResource(R.string.reset_to_default_button), - onClick = onResetMtu - ) + if (mtuInitial != null) { + NegativeButton( + modifier = Modifier.fillMaxWidth(), + text = stringResource(R.string.reset_to_default_button), + onClick = onResetMtu + ) + } PrimaryButton( modifier = Modifier.fillMaxWidth(),