|
@@ -95,6 +95,7 @@ import com.vpn.fastestvpnservice.beans.Protocol
|
|
|
import com.vpn.fastestvpnservice.beans.isDarkTheme
|
|
|
import com.vpn.fastestvpnservice.beans.themesList
|
|
|
import com.vpn.fastestvpnservice.constants.AppEnum
|
|
|
+import com.vpn.fastestvpnservice.constants.smartConnect
|
|
|
import com.vpn.fastestvpnservice.helpers.BasePreferenceHelper
|
|
|
import com.vpn.fastestvpnservice.sealedClass.BottomBarScreen
|
|
|
import com.vpn.fastestvpnservice.sealedClass.Screen
|
|
@@ -748,11 +749,11 @@ fun ColumnScope.AddRowSettingsSmart(
|
|
|
) {
|
|
|
var isSmartSheetOpen by remember { mutableStateOf(isSheetShown) }
|
|
|
val sheetState = rememberModalBottomSheetState()
|
|
|
- val smartConnect = listOf<String>(
|
|
|
- "Recommended", "Recently", "Any Specific"
|
|
|
- )
|
|
|
+ val context = LocalContext.current
|
|
|
+ val basePreferenceHelper = BasePreferenceHelper(context)
|
|
|
+
|
|
|
var selectedSmartConnect by remember {
|
|
|
- mutableStateOf(smartConnect[0]) }
|
|
|
+ mutableStateOf(basePreferenceHelper.getSmartList()) }
|
|
|
|
|
|
if (isRowShown) {
|
|
|
Row(
|
|
@@ -859,6 +860,8 @@ fun ColumnScope.AddRowSettingsSmart(
|
|
|
selected = selectedSmartConnect == smart,
|
|
|
onClick = {
|
|
|
selectedSmartConnect = smart
|
|
|
+ basePreferenceHelper.saveSmartList(smart)
|
|
|
+ isSmartSheetOpen = false
|
|
|
},
|
|
|
)
|
|
|
// .indication(
|
|
@@ -873,6 +876,8 @@ fun ColumnScope.AddRowSettingsSmart(
|
|
|
RadioButton(selected = smart == selectedSmartConnect,
|
|
|
onClick = {
|
|
|
selectedSmartConnect = smart
|
|
|
+ basePreferenceHelper.saveSmartList(smart)
|
|
|
+ isSmartSheetOpen = false
|
|
|
},
|
|
|
colors = RadioButtonDefaults.colors(
|
|
|
selectedColor = colorResource(id = R.color.radio_button_blue),
|