summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBug Magnet <marco.nikic@mullvad.net>2023-08-22 13:54:40 +0200
committerBug Magnet <marco.nikic@mullvad.net>2023-08-22 13:54:40 +0200
commit3413af0cf834f60259fe11d4b45094defd68aa88 (patch)
tree4e5f1a28d026ea1652e706a4df588f8670fe1357
parent5881129e612ce8928e289b56b3f84f762d773b73 (diff)
parent304a4b1a5c58a96e0231689ddb357bab5c313c0b (diff)
downloadmullvadvpn-3413af0cf834f60259fe11d4b45094defd68aa88.tar.xz
mullvadvpn-3413af0cf834f60259fe11d4b45094defd68aa88.zip
Merge branch 'fix-swiftlint-warning-void_function_in_ternary-ios-269'
-rw-r--r--ios/MullvadVPN/Containers/Root/RootContainerViewController.swift16
-rw-r--r--ios/MullvadVPN/View controllers/AccountDeletion/AccountDeletionContentView.swift6
-rw-r--r--ios/MullvadVPN/View controllers/RedeemVoucher/RedeemVoucherContentView.swift6
3 files changed, 20 insertions, 8 deletions
diff --git a/ios/MullvadVPN/Containers/Root/RootContainerViewController.swift b/ios/MullvadVPN/Containers/Root/RootContainerViewController.swift
index 5a6907a2cf..728b173e40 100644
--- a/ios/MullvadVPN/Containers/Root/RootContainerViewController.swift
+++ b/ios/MullvadVPN/Containers/Root/RootContainerViewController.swift
@@ -102,9 +102,11 @@ class RootContainerViewController: UIViewController {
guard let notificationController else {
return
}
- isNavigationBarHidden
- ? removeNotificationController(notificationController)
- : addNotificationController(notificationController)
+ if isNavigationBarHidden {
+ removeNotificationController(notificationController)
+ } else {
+ addNotificationController(notificationController)
+ }
}
}
@@ -686,9 +688,11 @@ class RootContainerViewController: UIViewController {
private func updateNotificationBarHiddenFromChildPreferences() {
if let notificationController,
let conforming = topViewController as? RootContainment {
- conforming.prefersNotificationBarHidden
- ? removeNotificationController(notificationController)
- : addNotificationController(notificationController)
+ if conforming.prefersNotificationBarHidden {
+ removeNotificationController(notificationController)
+ } else {
+ addNotificationController(notificationController)
+ }
}
}
diff --git a/ios/MullvadVPN/View controllers/AccountDeletion/AccountDeletionContentView.swift b/ios/MullvadVPN/View controllers/AccountDeletion/AccountDeletionContentView.swift
index 51fcc42161..64be3a200b 100644
--- a/ios/MullvadVPN/View controllers/AccountDeletion/AccountDeletionContentView.swift
+++ b/ios/MullvadVPN/View controllers/AccountDeletion/AccountDeletionContentView.swift
@@ -319,7 +319,11 @@ class AccountDeletionContentView: UIView {
}
private func updateUI() {
- isLoading ? activityIndicator.startAnimating() : activityIndicator.stopAnimating()
+ if isLoading {
+ activityIndicator.startAnimating()
+ } else {
+ activityIndicator.stopAnimating()
+ }
deleteButton.isEnabled = isDeleteButtonEnabled && isAccountNumberLengthSatisfied
statusLabel.text = text
statusLabel.textColor = textColor
diff --git a/ios/MullvadVPN/View controllers/RedeemVoucher/RedeemVoucherContentView.swift b/ios/MullvadVPN/View controllers/RedeemVoucher/RedeemVoucherContentView.swift
index b2f4d2003d..97ada9e1a9 100644
--- a/ios/MullvadVPN/View controllers/RedeemVoucher/RedeemVoucherContentView.swift
+++ b/ios/MullvadVPN/View controllers/RedeemVoucher/RedeemVoucherContentView.swift
@@ -264,7 +264,11 @@ final class RedeemVoucherContentView: UIView {
}
private func updateUI() {
- isLoading ? activityIndicator.startAnimating() : activityIndicator.stopAnimating()
+ if isLoading {
+ activityIndicator.startAnimating()
+ } else {
+ activityIndicator.stopAnimating()
+ }
redeemButton.isEnabled = isRedeemButtonEnabled && textField.isVoucherLengthSatisfied
statusLabel.text = text
statusLabel.textColor = textColor