summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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)