|  | @@ -554,9 +554,9 @@ fun Home(navHostController: NavHostController, activity: ComponentActivity) {
 | 
	
		
			
				|  |  |                      .fillMaxSize()
 | 
	
		
			
				|  |  |              ) {
 | 
	
		
			
				|  |  |                  /* Smart Connect Box*/
 | 
	
		
			
				|  |  | -                if (isConnect == App.CONNECTED) {
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -                    /* Commenting so far because It's remaining... */
 | 
	
		
			
				|  |  | +//                if (isConnect == App.CONNECTED) {
 | 
	
		
			
				|  |  | +//
 | 
	
		
			
				|  |  | +//                    /* Commenting so far because It's remaining... */
 | 
	
		
			
				|  |  |  //                    Box(
 | 
	
		
			
				|  |  |  //                        modifier = Modifier
 | 
	
		
			
				|  |  |  //                            .fillMaxWidth()
 | 
	
	
		
			
				|  | @@ -664,97 +664,97 @@ fun Home(navHostController: NavHostController, activity: ComponentActivity) {
 | 
	
		
			
				|  |  |  //                            }
 | 
	
		
			
				|  |  |  //                        }
 | 
	
		
			
				|  |  |  //                    }
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                else {
 | 
	
		
			
				|  |  | -                    Box(
 | 
	
		
			
				|  |  | -                        modifier = Modifier
 | 
	
		
			
				|  |  | -                            .fillMaxWidth()
 | 
	
		
			
				|  |  | -                            .padding(20.dp)
 | 
	
		
			
				|  |  | -                            .padding(top = 0.dp)
 | 
	
		
			
				|  |  | -                            .height(120.dp)
 | 
	
		
			
				|  |  | -                            .border(
 | 
	
		
			
				|  |  | -                                border = BorderStroke(2.dp, MaterialTheme.colorScheme.onBackground),
 | 
	
		
			
				|  |  | -                                shape = RoundedCornerShape(28.dp)
 | 
	
		
			
				|  |  | -                            )
 | 
	
		
			
				|  |  | -                            .background(
 | 
	
		
			
				|  |  | -                                shape = RoundedCornerShape(28.dp),
 | 
	
		
			
				|  |  | -                                color = MaterialTheme.colorScheme.onBackground
 | 
	
		
			
				|  |  | -                            ),
 | 
	
		
			
				|  |  | -                    ) {
 | 
	
		
			
				|  |  | -                        AddRowSmart(navHostController, basePreferenceHelper, context)
 | 
	
		
			
				|  |  | -                        var smartServer = basePreferenceHelper.getSmartServerObject()
 | 
	
		
			
				|  |  | -                        val selectedSmartList = basePreferenceHelper.getSmartList()
 | 
	
		
			
				|  |  | -                        when(selectedSmartList) {
 | 
	
		
			
				|  |  | -                            smartConnect[0] -> {
 | 
	
		
			
				|  |  | -                                smartServer = basePreferenceHelper.getSmartServerObject()
 | 
	
		
			
				|  |  | -                            }
 | 
	
		
			
				|  |  | -                            smartConnect[1] -> {
 | 
	
		
			
				|  |  | -                                smartServer = basePreferenceHelper.getServerObject()
 | 
	
		
			
				|  |  | -                            }
 | 
	
		
			
				|  |  | -                            smartConnect[2] -> {}
 | 
	
		
			
				|  |  | -                            else -> {}
 | 
	
		
			
				|  |  | +//                }
 | 
	
		
			
				|  |  | +//                else { }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                Box(
 | 
	
		
			
				|  |  | +                    modifier = Modifier
 | 
	
		
			
				|  |  | +                        .fillMaxWidth()
 | 
	
		
			
				|  |  | +                        .padding(20.dp)
 | 
	
		
			
				|  |  | +                        .padding(top = 0.dp)
 | 
	
		
			
				|  |  | +                        .height(120.dp)
 | 
	
		
			
				|  |  | +                        .border(
 | 
	
		
			
				|  |  | +                            border = BorderStroke(2.dp, MaterialTheme.colorScheme.onBackground),
 | 
	
		
			
				|  |  | +                            shape = RoundedCornerShape(28.dp)
 | 
	
		
			
				|  |  | +                        )
 | 
	
		
			
				|  |  | +                        .background(
 | 
	
		
			
				|  |  | +                            shape = RoundedCornerShape(28.dp),
 | 
	
		
			
				|  |  | +                            color = MaterialTheme.colorScheme.onBackground
 | 
	
		
			
				|  |  | +                        ),
 | 
	
		
			
				|  |  | +                ) {
 | 
	
		
			
				|  |  | +                    AddRowSmart(navHostController, basePreferenceHelper, context)
 | 
	
		
			
				|  |  | +                    var smartServer = basePreferenceHelper.getSmartServerObject()
 | 
	
		
			
				|  |  | +                    val selectedSmartList = basePreferenceHelper.getSmartList()
 | 
	
		
			
				|  |  | +                    when(selectedSmartList) {
 | 
	
		
			
				|  |  | +                        smartConnect[0] -> {
 | 
	
		
			
				|  |  | +                            smartServer = basePreferenceHelper.getSmartServerObject()
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  | -                        Button(
 | 
	
		
			
				|  |  | -                            onClick = {
 | 
	
		
			
				|  |  | -                                Log.d("test_button", "onClick Smart Connect ${smartServer?.server_name}")
 | 
	
		
			
				|  |  | -                                basePreferenceHelper.setServerObject(smartServer)
 | 
	
		
			
				|  |  | -                                if (isConnect == App.CONNECTED || isConnect == App.CONNECTING) {
 | 
	
		
			
				|  |  | -                                    Log.d("isConnect_State_vpn", "stopVPN")
 | 
	
		
			
				|  |  | -                                    vpnConnectionsUtil.stopVpn()
 | 
	
		
			
				|  |  | -                                    homeViewModel.getIp()
 | 
	
		
			
				|  |  | -                                } else {
 | 
	
		
			
				|  |  | -                                    Log.d("isConnect_State_vpn", "startVPN")
 | 
	
		
			
				|  |  | -                                    vpnConnectionsUtil.startVpn()
 | 
	
		
			
				|  |  | -                                }
 | 
	
		
			
				|  |  | +                        smartConnect[1] -> {
 | 
	
		
			
				|  |  | +                            smartServer = basePreferenceHelper.getServerObject()
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                        smartConnect[2] -> {}
 | 
	
		
			
				|  |  | +                        else -> {}
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                    Button(
 | 
	
		
			
				|  |  | +                        onClick = {
 | 
	
		
			
				|  |  | +                            Log.d("test_button", "onClick Smart Connect ${smartServer?.server_name}")
 | 
	
		
			
				|  |  | +                            basePreferenceHelper.setServerObject(smartServer)
 | 
	
		
			
				|  |  | +                            if (isConnect == App.CONNECTED || isConnect == App.CONNECTING) {
 | 
	
		
			
				|  |  | +                                Log.d("isConnect_State_vpn", "stopVPN")
 | 
	
		
			
				|  |  | +                                vpnConnectionsUtil.stopVpn()
 | 
	
		
			
				|  |  | +                                homeViewModel.getIp()
 | 
	
		
			
				|  |  | +                            } else {
 | 
	
		
			
				|  |  | +                                Log.d("isConnect_State_vpn", "startVPN")
 | 
	
		
			
				|  |  | +                                vpnConnectionsUtil.startVpn()
 | 
	
		
			
				|  |  | +                            }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  //                                navHostController.navigate(
 | 
	
		
			
				|  |  |  //                                    BottomBarScreen.Settings.route
 | 
	
		
			
				|  |  |  //                                )
 | 
	
		
			
				|  |  |  //                                BottomBarScreen.Settings.isTrue = true
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -                            },
 | 
	
		
			
				|  |  | -                            modifier = Modifier
 | 
	
		
			
				|  |  | -                                .padding(start = 14.dp, end = 14.dp, bottom = 12.dp, top = 16.dp)
 | 
	
		
			
				|  |  | -                                .align(Alignment.BottomCenter)
 | 
	
		
			
				|  |  | -                                .background(colorResource(id = R.color.transparent))
 | 
	
		
			
				|  |  | -                                .fillMaxWidth()
 | 
	
		
			
				|  |  | -                                .height(40.dp),
 | 
	
		
			
				|  |  | -                            shape = RoundedCornerShape(16.dp),
 | 
	
		
			
				|  |  | -                            colors = ButtonDefaults.buttonColors(
 | 
	
		
			
				|  |  | -                                contentColor = colorResource(id = R.color.white),
 | 
	
		
			
				|  |  | -                                containerColor = colorResource(id = R.color.blue_text),
 | 
	
		
			
				|  |  | -                            ),
 | 
	
		
			
				|  |  | -                        ) {
 | 
	
		
			
				|  |  | -                            Text(
 | 
	
		
			
				|  |  | -                                text = "Smart Connect",
 | 
	
		
			
				|  |  | -                                style = MaterialTheme.typography.customTypography.labelLarge,
 | 
	
		
			
				|  |  | -                                modifier = Modifier.background(Color.Transparent)
 | 
	
		
			
				|  |  | -                            )
 | 
	
		
			
				|  |  | -                        }
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -                /* Select Server Box*/
 | 
	
		
			
				|  |  | -                if (isConnect != App.CONNECTED) {
 | 
	
		
			
				|  |  | -                    Box(
 | 
	
		
			
				|  |  | +                        },
 | 
	
		
			
				|  |  |                          modifier = Modifier
 | 
	
		
			
				|  |  | +                            .padding(start = 14.dp, end = 14.dp, bottom = 12.dp, top = 16.dp)
 | 
	
		
			
				|  |  | +                            .align(Alignment.BottomCenter)
 | 
	
		
			
				|  |  | +                            .background(colorResource(id = R.color.transparent))
 | 
	
		
			
				|  |  |                              .fillMaxWidth()
 | 
	
		
			
				|  |  | -                            .padding(20.dp)
 | 
	
		
			
				|  |  | -                            .padding(bottom = 0.dp)
 | 
	
		
			
				|  |  | -                            .height(70.dp)
 | 
	
		
			
				|  |  | -                            .border(
 | 
	
		
			
				|  |  | -                                border = BorderStroke(2.dp, MaterialTheme.colorScheme.onBackground),
 | 
	
		
			
				|  |  | -                                shape = RoundedCornerShape(28.dp)
 | 
	
		
			
				|  |  | -                            )
 | 
	
		
			
				|  |  | -                            .background(
 | 
	
		
			
				|  |  | -                                shape = RoundedCornerShape(28.dp),
 | 
	
		
			
				|  |  | -                                color = MaterialTheme.colorScheme.onBackground
 | 
	
		
			
				|  |  | -                            ),
 | 
	
		
			
				|  |  | -                        contentAlignment = Alignment.CenterStart,
 | 
	
		
			
				|  |  | +                            .height(40.dp),
 | 
	
		
			
				|  |  | +                        shape = RoundedCornerShape(16.dp),
 | 
	
		
			
				|  |  | +                        colors = ButtonDefaults.buttonColors(
 | 
	
		
			
				|  |  | +                            contentColor = colorResource(id = R.color.white),
 | 
	
		
			
				|  |  | +                            containerColor = colorResource(id = R.color.blue_text),
 | 
	
		
			
				|  |  | +                        ),
 | 
	
		
			
				|  |  |                      ) {
 | 
	
		
			
				|  |  | -                        AddRowSelectServer(navHostController)
 | 
	
		
			
				|  |  | +                        Text(
 | 
	
		
			
				|  |  | +                            text = "Smart Connect",
 | 
	
		
			
				|  |  | +                            style = MaterialTheme.typography.customTypography.labelLarge,
 | 
	
		
			
				|  |  | +                            modifier = Modifier.background(Color.Transparent)
 | 
	
		
			
				|  |  | +                        )
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                /* Select Server Box*/
 | 
	
		
			
				|  |  | +//                if (isConnect != App.CONNECTED) { }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                Box(
 | 
	
		
			
				|  |  | +                    modifier = Modifier
 | 
	
		
			
				|  |  | +                        .fillMaxWidth()
 | 
	
		
			
				|  |  | +                        .padding(20.dp)
 | 
	
		
			
				|  |  | +                        .padding(bottom = 0.dp)
 | 
	
		
			
				|  |  | +                        .height(70.dp)
 | 
	
		
			
				|  |  | +                        .border(
 | 
	
		
			
				|  |  | +                            border = BorderStroke(2.dp, MaterialTheme.colorScheme.onBackground),
 | 
	
		
			
				|  |  | +                            shape = RoundedCornerShape(28.dp)
 | 
	
		
			
				|  |  | +                        )
 | 
	
		
			
				|  |  | +                        .background(
 | 
	
		
			
				|  |  | +                            shape = RoundedCornerShape(28.dp),
 | 
	
		
			
				|  |  | +                            color = MaterialTheme.colorScheme.onBackground
 | 
	
		
			
				|  |  | +                        ),
 | 
	
		
			
				|  |  | +                    contentAlignment = Alignment.CenterStart,
 | 
	
		
			
				|  |  | +                ) {
 | 
	
		
			
				|  |  | +                    AddRowSelectServer(navHostController)
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 |