|
@@ -95,6 +95,7 @@ import androidx.lifecycle.viewmodel.compose.viewModel
|
|
|
import androidx.navigation.NavHostController
|
|
|
import androidx.navigation.compose.rememberNavController
|
|
|
import com.vpn.fastestvpnservice.application.App
|
|
|
+import com.vpn.fastestvpnservice.beans.Protocol
|
|
|
import com.vpn.fastestvpnservice.beans.Server
|
|
|
import com.vpn.fastestvpnservice.beans.isDarkTheme
|
|
|
import com.vpn.fastestvpnservice.helpers.BasePreferenceHelper
|
|
@@ -151,7 +152,12 @@ var serverObj: MutableState<Server> = mutableStateOf(Server())
|
|
|
onClick()
|
|
|
|
|
|
}
|
|
|
-}
|
|
|
+
|
|
|
+ @Composable
|
|
|
+ override fun OnChangeProtocol(protocol: Protocol) {
|
|
|
+ Log.d("OnChangeProtocol", "OnChangeProtocol called!")
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
@OptIn(ExperimentalFoundationApi::class, ExperimentalMaterial3Api::class)
|
|
|
@Composable
|
|
@@ -305,6 +311,7 @@ fun Home(navHostController: NavHostController, activity: ComponentActivity) {
|
|
|
|
|
|
if (isConnect) {
|
|
|
wireGuardConnection.stopVpn()
|
|
|
+ homeViewModel.getIp()
|
|
|
} else {
|
|
|
wireGuardConnection.startVpn()
|
|
|
}
|