summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMojgan <Mojgan.jelodar@codic.se>2023-10-18 16:56:08 +0200
committerBug Magnet <marco.nikic@mullvad.net>2023-10-19 11:41:50 +0200
commit70cac86ab1555319fce5bbc522e7017c407f414a (patch)
tree6e223cf4cbd25d79ef4321901af30d2813447fc0
parent39159c39ff27f40d30c90156c3efc9e1aa5ea7f5 (diff)
downloadmullvadvpn-70cac86ab1555319fce5bbc522e7017c407f414a.tar.xz
mullvadvpn-70cac86ab1555319fce5bbc522e7017c407f414a.zip
remove voucher redemption on production
-rw-r--r--ios/MullvadVPN/View controllers/Account/AccountContentView.swift19
-rw-r--r--ios/MullvadVPN/View controllers/CreationAccount/Welcome/WelcomeContentView.swift2
2 files changed, 13 insertions, 8 deletions
diff --git a/ios/MullvadVPN/View controllers/Account/AccountContentView.swift b/ios/MullvadVPN/View controllers/Account/AccountContentView.swift
index a3ffd21d56..563b9e8505 100644
--- a/ios/MullvadVPN/View controllers/Account/AccountContentView.swift
+++ b/ios/MullvadVPN/View controllers/Account/AccountContentView.swift
@@ -99,14 +99,17 @@ class AccountContentView: UIView {
}()
lazy var buttonStackView: UIStackView = {
- let stackView =
- UIStackView(arrangedSubviews: [
- redeemVoucherButton,
- purchaseButton,
- restorePurchasesButton,
- logoutButton,
- deleteButton,
- ])
+ var arrangedSubviews = [UIView]()
+ #if DEBUG
+ arrangedSubviews.append(redeemVoucherButton)
+ #endif
+ arrangedSubviews.append(contentsOf: [
+ purchaseButton,
+ restorePurchasesButton,
+ logoutButton,
+ deleteButton,
+ ])
+ let stackView = UIStackView(arrangedSubviews: arrangedSubviews)
stackView.translatesAutoresizingMaskIntoConstraints = false
stackView.axis = .vertical
stackView.spacing = UIMetrics.padding16
diff --git a/ios/MullvadVPN/View controllers/CreationAccount/Welcome/WelcomeContentView.swift b/ios/MullvadVPN/View controllers/CreationAccount/Welcome/WelcomeContentView.swift
index 479c096aac..de2ff4c77a 100644
--- a/ios/MullvadVPN/View controllers/CreationAccount/Welcome/WelcomeContentView.swift
+++ b/ios/MullvadVPN/View controllers/CreationAccount/Welcome/WelcomeContentView.swift
@@ -225,7 +225,9 @@ final class WelcomeContentView: UIView {
textsStackView.addArrangedSubview(descriptionLabel)
buttonsStackView.addArrangedSubview(purchaseButton)
+ #if DEBUG
buttonsStackView.addArrangedSubview(redeemVoucherButton)
+ #endif
addSubview(textsStackView)
addSubview(buttonsStackView)