|
@@ -261,6 +261,28 @@ fun SubscriptionScreen(navHostController: NavHostController, activity: Component
|
|
|
style = MaterialTheme.typography.customTypography2.bodySmall
|
|
|
)
|
|
|
}
|
|
|
+
|
|
|
+ val subscriptionData = subscriptionViewModel.mutableLiveDataSubscription.observeAsState().value
|
|
|
+ subscriptionData?.let {
|
|
|
+ Log.d("subs_screen_data", "msg = ${it.message} ${it.data?.size}")
|
|
|
+
|
|
|
+ it.product?.let {
|
|
|
+ basePreferenceHelper.saveProduct(it)
|
|
|
+ }
|
|
|
+ it.wireguard?.let {
|
|
|
+ basePreferenceHelper.saveWireGuard(it)
|
|
|
+ }
|
|
|
+ it.available_protocols.let {
|
|
|
+ basePreferenceHelper.saveAvailableProtocols(it)
|
|
|
+ }
|
|
|
+ it.enabled_protocols.let {
|
|
|
+ basePreferenceHelper.saveEnabledProtocols(it)
|
|
|
+ }
|
|
|
+
|
|
|
+ it.data?.let {
|
|
|
+ basePreferenceHelper.saveServerData(it)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|