Skip to content

Commit 887e907

Browse files
committed
Hide the Reset button when already default
1 parent ab1424d commit 887e907

File tree

1 file changed

+7
-5
lines changed
  • android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog

1 file changed

+7
-5
lines changed

android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/MtuDialog.kt

+7-5
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,13 @@ fun MtuDialog(
119119
}
120120
)
121121

122-
PrimaryButton(
123-
modifier = Modifier.fillMaxWidth(),
124-
text = stringResource(R.string.reset_to_default_button),
125-
onClick = onResetMtu
126-
)
122+
if (mtuInitial != null) {
123+
PrimaryButton(
124+
modifier = Modifier.fillMaxWidth(),
125+
text = stringResource(R.string.reset_to_default_button),
126+
onClick = onResetMtu
127+
)
128+
}
127129

128130
PrimaryButton(
129131
modifier = Modifier.fillMaxWidth(),

0 commit comments

Comments
 (0)