Skip to content

Commit

Permalink
Remove the auto-connect switch when vpn settings are available
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Feb 8, 2024
1 parent 70791a5 commit a70136b
Showing 1 changed file with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -312,18 +312,21 @@ fun VpnSettingsScreen(
text = stringResource(id = R.string.auto_connect_and_lockdown_mode_footer)
)
}
}
item {
Spacer(modifier = Modifier.height(Dimens.cellLabelVerticalPadding))
HeaderSwitchComposeCell(
title = stringResource(R.string.auto_connect),
isToggled = uiState.isAutoConnectEnabled,
isEnabled = true,
onCellClicked = { newValue -> onToggleAutoConnect(newValue) }
)
}
item {
SwitchComposeSubtitleCell(text = stringResource(id = R.string.auto_connect_footer))
} else {
item {
Spacer(modifier = Modifier.height(Dimens.cellLabelVerticalPadding))
HeaderSwitchComposeCell(
title = stringResource(R.string.auto_connect),
isToggled = uiState.isAutoConnectEnabled,
isEnabled = true,
onCellClicked = { newValue -> onToggleAutoConnect(newValue) }
)
}
item {
SwitchComposeSubtitleCell(
text = stringResource(id = R.string.auto_connect_footer)
)
}
}
item {
Spacer(modifier = Modifier.height(Dimens.cellLabelVerticalPadding))
Expand Down

0 comments on commit a70136b

Please sign in to comment.