Skip to content

Commit

Permalink
Merge branch 'fix-swiftlint-warning-void_function_in_ternary-ios-269'
Browse files Browse the repository at this point in the history
  • Loading branch information
buggmagnet committed Aug 22, 2023
2 parents 5881129 + 304a4b1 commit 3413af0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
16 changes: 10 additions & 6 deletions ios/MullvadVPN/Containers/Root/RootContainerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ class RootContainerViewController: UIViewController {
guard let notificationController else {
return
}
isNavigationBarHidden
? removeNotificationController(notificationController)
: addNotificationController(notificationController)
if isNavigationBarHidden {
removeNotificationController(notificationController)
} else {
addNotificationController(notificationController)
}
}
}

Expand Down Expand Up @@ -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)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3413af0

Please sign in to comment.