|
@@ -68,7 +68,7 @@ fun AutoConnectScreen(navHostController: NavHostController) {
|
|
|
var isAdded by rememberSaveable { mutableStateOf(false) }
|
|
|
var isAddedWifi by rememberSaveable { mutableStateOf(false) }
|
|
|
var isSwitch by rememberSaveable { mutableStateOf(basePreferenceHelper.getAutoConnectState()) }
|
|
|
- isSwitchMutable.value = isSwitch
|
|
|
+ isSwitchMutable.value = basePreferenceHelper.getAutoConnectState()
|
|
|
|
|
|
val wifiList = settingsViewModel.liveDataConnectedWifi.observeAsState().value
|
|
|
val connectedWifiSsid = settingsViewModel.liveDataConnectedSsid.observeAsState().value
|
|
@@ -126,6 +126,7 @@ fun AutoConnectScreen(navHostController: NavHostController) {
|
|
|
onCheckedChange = { state ->
|
|
|
isSwitch = state
|
|
|
basePreferenceHelper.saveAutoConnectState(isSwitch)
|
|
|
+ isSwitchMutable.value = isSwitch
|
|
|
|
|
|
if (isSwitch) {
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
@@ -184,8 +185,8 @@ fun AutoConnectScreen(navHostController: NavHostController) {
|
|
|
AddRowSettingsSmart(
|
|
|
icon = R.drawable.smart_connect3x,
|
|
|
text = selectedSmart.value,
|
|
|
- isRowShown = false,
|
|
|
- isSheetShown = isSwitchMutable.value,
|
|
|
+ isRowShown = true,
|
|
|
+ isSheetShown = false,
|
|
|
navHostController = navHostController,
|
|
|
topPadding = 20.dp
|
|
|
)
|