summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBug Magnet <marco.nikic@mullvad.net>2023-10-19 11:42:19 +0200
committerBug Magnet <marco.nikic@mullvad.net>2023-10-19 11:42:19 +0200
commited5722ddabbdd860778f53c33d5b8bb5f7d6a6da (patch)
tree6e223cf4cbd25d79ef4321901af30d2813447fc0
parent39159c39ff27f40d30c90156c3efc9e1aa5ea7f5 (diff)
parent70cac86ab1555319fce5bbc522e7017c407f414a (diff)
downloadmullvadvpn-ed5722ddabbdd860778f53c33d5b8bb5f7d6a6da.tar.xz
mullvadvpn-ed5722ddabbdd860778f53c33d5b8bb5f7d6a6da.zip
Merge branch 'disable-redeeming-voucher-on-production-ios-349'
-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)