|
@@ -88,6 +88,7 @@ import com.vpn.fastestvpnservice.customItems.SubscriptionPackageItem
|
|
|
import com.vpn.fastestvpnservice.customItems.getSelectedPosition
|
|
|
import com.vpn.fastestvpnservice.helpers.BasePreferenceHelper
|
|
|
import com.vpn.fastestvpnservice.screens.bottomNavBarScreens.OnLifecycleEvent
|
|
|
+import com.vpn.fastestvpnservice.sealedClass.BottomBarScreen
|
|
|
import com.vpn.fastestvpnservice.sealedClass.Screen
|
|
|
import com.vpn.fastestvpnservice.ui.theme.FastestVPNTheme
|
|
|
import com.vpn.fastestvpnservice.ui.theme.customTypography2
|
|
@@ -225,17 +226,24 @@ fun SubscriptionScreen(navHostController: NavHostController, activity: Component
|
|
|
|
|
|
onClick = {
|
|
|
selectedPosition = getSelectedPosition()
|
|
|
-// Toast.makeText(context, "$selectedPosition", Toast.LENGTH_SHORT).show()
|
|
|
Log.d("test_button", "onClick")
|
|
|
-// subscriptionViewModel.mutableLiveDataNumber.value = 1
|
|
|
Log.d("SubscriptionViewModel", "liveData ${skuDetailsListsSubs}")
|
|
|
|
|
|
-// subscriptionViewModel.startConnection(selectedPosition)
|
|
|
- if (skuDetailsListsSubs != null) {
|
|
|
- subscriptionViewModel.subscriptionProduct(
|
|
|
- selectedPosition, skuDetailsListsSubs, activity
|
|
|
- )
|
|
|
+ if (Screen.Subscription.isTrue)
|
|
|
+ {
|
|
|
+ navHostController.popBackStack(BottomBarScreen.Home.route, false)
|
|
|
+ } else {
|
|
|
+ navHostController.popBackStack()
|
|
|
}
|
|
|
+ Screen.Subscription.isTrue = false
|
|
|
+
|
|
|
+
|
|
|
+// subscriptionViewModel.startConnection(selectedPosition)
|
|
|
+// if (skuDetailsListsSubs != null) {
|
|
|
+// subscriptionViewModel.subscriptionProduct(
|
|
|
+// selectedPosition, skuDetailsListsSubs, activity
|
|
|
+// )
|
|
|
+// }
|
|
|
|
|
|
},
|
|
|
modifier = Modifier
|
|
@@ -312,6 +320,7 @@ fun OnLifecycleEventSS(onEvent: (
|
|
|
fun BoxScope.HeaderRowSS(navHostController: NavHostController) {
|
|
|
IconButton(
|
|
|
onClick = {
|
|
|
+ Screen.Subscription.isTrue = false
|
|
|
navHostController.popBackStack()
|
|
|
// navHostController.navigate(BottomBarScreen.Help.route)
|
|
|
},
|