Skip to content

Commit 0cf8d92

Browse files
committed
Remove the auto-connect switch when vpn settings are available
1 parent 8956f99 commit 0cf8d92

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/VpnSettingsScreen.kt

+15-12
Original file line numberDiff line numberDiff line change
@@ -312,18 +312,21 @@ fun VpnSettingsScreen(
312312
text = stringResource(id = R.string.auto_connect_and_lockdown_mode_footer)
313313
)
314314
}
315-
}
316-
item {
317-
Spacer(modifier = Modifier.height(Dimens.cellLabelVerticalPadding))
318-
HeaderSwitchComposeCell(
319-
title = stringResource(R.string.auto_connect),
320-
isToggled = uiState.isAutoConnectEnabled,
321-
isEnabled = true,
322-
onCellClicked = { newValue -> onToggleAutoConnect(newValue) }
323-
)
324-
}
325-
item {
326-
SwitchComposeSubtitleCell(text = stringResource(id = R.string.auto_connect_footer))
315+
} else {
316+
item {
317+
Spacer(modifier = Modifier.height(Dimens.cellLabelVerticalPadding))
318+
HeaderSwitchComposeCell(
319+
title = stringResource(R.string.auto_connect),
320+
isToggled = uiState.isAutoConnectEnabled,
321+
isEnabled = true,
322+
onCellClicked = { newValue -> onToggleAutoConnect(newValue) }
323+
)
324+
}
325+
item {
326+
SwitchComposeSubtitleCell(
327+
text = stringResource(id = R.string.auto_connect_footer)
328+
)
329+
}
327330
}
328331
item {
329332
Spacer(modifier = Modifier.height(Dimens.cellLabelVerticalPadding))

0 commit comments

Comments
 (0)