fix: toggle state bug

This commit is contained in:
Zane Schepke 2024-12-26 22:56:09 -05:00
parent 7cbbf00e52
commit b2e266fc9f
4 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ android {
generateLocaleConfig = true
}
//reproducibility
// reproducibility
dependenciesInfo {
// Disables dependency metadata when building APKs.
includeInApk = false

View File

@ -40,7 +40,7 @@ import com.zaneschepke.wireguardautotunnel.util.extensions.scaledWidth
@Composable
fun OptionsScreen(tunnelOptionsViewModel: TunnelOptionsViewModel = hiltViewModel(), appUiState: AppUiState, tunnelId: Int) {
val navController = LocalNavController.current
val config = remember { appUiState.tunnels.first { it.id == tunnelId } }
val config = appUiState.tunnels.first { it.id == tunnelId }
var currentText by remember { mutableStateOf("") }

View File

@ -76,7 +76,7 @@ fun SplitTunnelScreen(appUiState: AppUiState, tunnelId: Int, viewModel: AppViewM
if (popBackStack) navController.popBackStack()
}
val config by remember { derivedStateOf { appUiState.tunnels.first { it.id == tunnelId } } }
val config = appUiState.tunnels.first { it.id == tunnelId }
val splitTunnelApps by viewModel.splitTunnelApps.collectAsStateWithLifecycle()

View File

@ -49,7 +49,7 @@ import com.zaneschepke.wireguardautotunnel.util.extensions.scaledWidth
@Composable
fun TunnelAutoTunnelScreen(appUiState: AppUiState, tunnelId: Int, tunnelAutoTunnelViewModel: TunnelAutoTunnelViewModel = hiltViewModel()) {
val config = remember { appUiState.tunnels.first { it.id == tunnelId } }
val config = appUiState.tunnels.first { it.id == tunnelId }
var currentText by remember { mutableStateOf("") }