Skip to content

Commit

Permalink
Remove disabled description
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawa committed Apr 4, 2024
1 parent de14699 commit fc0a9c0
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ fun SplitTunnelingScreen(
state = lazyListState
) {
enabledToggle(enabled = state.enabled, onEnableSplitTunneling = onEnableSplitTunneling)
description(enabled = state.enabled)
description()
spacer()
when (state) {
is SplitTunnelingUiState.Loading -> {
Expand Down Expand Up @@ -161,16 +161,9 @@ private fun LazyListScope.enabledToggle(
}
}

private fun LazyListScope.description(enabled: Boolean) {
private fun LazyListScope.description() {
item(key = CommonContentKey.DESCRIPTION, contentType = ContentType.DESCRIPTION) {
SwitchComposeSubtitleCell(
text =
if (enabled) {
stringResource(id = R.string.split_tunneling_description)
} else {
stringResource(id = R.string.split_tunneling_disabled_description)
}
)
SwitchComposeSubtitleCell(text = stringResource(id = R.string.split_tunneling_description))
}
}

Expand Down

0 comments on commit fc0a9c0

Please sign in to comment.