Expand all if and guard constructs involving @available(iOS 14... or #available(iOS 14...

Signed-off-by: Johannes Marbach <johannesm@element.io>
This commit is contained in:
Johannes Marbach
2022-06-23 09:13:10 +02:00
parent df048803ef
commit 8b9cd5eaba
21 changed files with 113 additions and 468 deletions
@@ -104,13 +104,7 @@ class RoomActionProvider: RoomActionProviderProtocol {
}
private var leaveAction: UIAction {
let image: UIImage?
if #available(iOS 14.0, *) {
image = UIImage(systemName: "rectangle.righthalf.inset.fill.arrow.right")
} else {
image = UIImage(systemName: "rectangle.xmark")
}
let image = UIImage(systemName: "rectangle.righthalf.inset.fill.arrow.right")
let action = UIAction(title: VectorL10n.homeContextMenuLeave, image: image) { [weak self] action in
guard let self = self else { return }
self.service.leaveRoom(promptUser: true)