Skip to content

Commit

Permalink
Merge branch 'reset-to-default-inconsistency-droid-764'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawa committed Mar 21, 2024
2 parents ab1424d + 1738bd1 commit e53360f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ class MtuDialogTest {
val mockedClickHandler: () -> Unit = mockk(relaxed = true)
setContentWithTheme {
testMtuDialog(
mtuInitial = VALID_DUMMY_MTU_VALUE,
onResetMtu = mockedClickHandler,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit e53360f

Please sign in to comment.