|
|
@ -101,6 +101,7 @@ fun MainView(
|
|
|
|
navigation: MainViewNavigation,
|
|
|
|
navigation: MainViewNavigation,
|
|
|
|
viewModel: MainViewModel = viewModel()
|
|
|
|
viewModel: MainViewModel = viewModel()
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
|
|
|
|
val isOn = viewModel.vpnToggleState.collectAsState()
|
|
|
|
LoadingIndicator.Wrap {
|
|
|
|
LoadingIndicator.Wrap {
|
|
|
|
Scaffold(contentWindowInsets = WindowInsets.Companion.statusBars) { paddingInsets ->
|
|
|
|
Scaffold(contentWindowInsets = WindowInsets.Companion.statusBars) { paddingInsets ->
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
@ -115,7 +116,6 @@ fun MainView(
|
|
|
|
ListItem(
|
|
|
|
ListItem(
|
|
|
|
colors = MaterialTheme.colorScheme.surfaceContainerListItem,
|
|
|
|
colors = MaterialTheme.colorScheme.surfaceContainerListItem,
|
|
|
|
leadingContent = {
|
|
|
|
leadingContent = {
|
|
|
|
val isOn = viewModel.vpnToggleState.collectAsState(initial = false)
|
|
|
|
|
|
|
|
TintedSwitch(onCheckedChange = { viewModel.toggleVpn() }, checked = isOn.value)
|
|
|
|
TintedSwitch(onCheckedChange = { viewModel.toggleVpn() }, checked = isOn.value)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
headlineContent = {
|
|
|
|
headlineContent = {
|
|
|
|