diff --git a/Cliqz/Upgrade&Payment/Cotroller/SubscriptionController.swift b/Cliqz/Upgrade&Payment/Cotroller/SubscriptionController.swift index 05bb9a4fc..8ab2d860c 100644 --- a/Cliqz/Upgrade&Payment/Cotroller/SubscriptionController.swift +++ b/Cliqz/Upgrade&Payment/Cotroller/SubscriptionController.swift @@ -302,7 +302,7 @@ extension SubscriptionController: SubscriptionDataSourceDelegate { completion(self.standardSubscriptionProducts) } else { self.requestProducts { (standart, promo) in - completion(promo) + completion(standart) } } } diff --git a/Cliqz/Upgrade&Payment/View/PromoUpgradeViewController.swift b/Cliqz/Upgrade&Payment/View/PromoUpgradeViewController.swift index 590234339..23e54cbce 100644 --- a/Cliqz/Upgrade&Payment/View/PromoUpgradeViewController.swift +++ b/Cliqz/Upgrade&Payment/View/PromoUpgradeViewController.swift @@ -98,7 +98,7 @@ class PromoUpgradeViewController: UIViewController { self.startLoadingAnimation() self.dataSource.fetchProducts { (success) in if success { - self.subscriptionsTableView.reloadData() + self.reloadData() } else { self.showProductsRetrievalFailedAlert() } @@ -106,6 +106,12 @@ class PromoUpgradeViewController: UIViewController { } } + private func reloadData() { + self.subscriptionsTableView.reloadData() + self.conditionsLabel.text = self.dataSource.getConditionText() + self.promoCodeLabel.text = self.dataSource.promoText() + } + private func showProductsRetrievalFailedAlert() { let errorDescirption = NSLocalizedString("Sorry, Lumen cannot connect to the Internet.", tableName: "Lumen", comment: "Error when can't get list of available subscriptions") let alertController = UIAlertController(title: "", message: errorDescirption, preferredStyle: .alert) @@ -142,7 +148,7 @@ class PromoUpgradeViewController: UIViewController { self.view.addSubview(subscriptionsTableView) conditionsLabel.numberOfLines = 0 - conditionsLabel.text = self.dataSource.getConditionText() //NSLocalizedString("", tableName: "Lumen", comment: "[Upgrade Flow] Conditions text") + conditionsLabel.text = self.dataSource.getConditionText() conditionsLabel.textColor = UIColor(colorString: "BDC0CE") conditionsLabel.textAlignment = .center