mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Removes unnecessary #available checks
This commit is contained in:
@@ -707,13 +707,10 @@ private extension MyAppsViewController
|
||||
}
|
||||
}
|
||||
|
||||
if #available(iOS 14, *)
|
||||
{
|
||||
let interaction = INInteraction.refreshAllApps()
|
||||
interaction.donate { (error) in
|
||||
guard let error = error else { return }
|
||||
print("Failed to donate intent \(interaction.intent).", error)
|
||||
}
|
||||
let interaction = INInteraction.refreshAllApps()
|
||||
interaction.donate { (error) in
|
||||
guard let error = error else { return }
|
||||
print("Failed to donate intent \(interaction.intent).", error)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1145,8 +1142,6 @@ private extension MyAppsViewController
|
||||
|
||||
if !UserDefaults.standard.isAppLimitDisabled && UserDefaults.standard.activeAppsLimit != nil, #available(iOS 13, *)
|
||||
{
|
||||
// UserDefaults.standard.activeAppsLimit is only non-nil on iOS 13.3.1 or later, so the #available check is just so we can use Combine.
|
||||
|
||||
guard let app = ALTApplication(fileURL: installedApp.fileURL) else { return finish(.failure(OperationError.invalidApp)) }
|
||||
|
||||
var cancellable: AnyCancellable?
|
||||
@@ -1595,12 +1590,7 @@ extension MyAppsViewController
|
||||
|
||||
headerView.textLabel.text = NSLocalizedString("Inactive", comment: "")
|
||||
headerView.button.setTitle(nil, for: .normal)
|
||||
|
||||
if #available(iOS 13.0, *)
|
||||
{
|
||||
headerView.button.setImage(UIImage(systemName: "questionmark.circle"), for: .normal)
|
||||
}
|
||||
|
||||
headerView.button.setImage(UIImage(systemName: "questionmark.circle"), for: .normal)
|
||||
headerView.button.addTarget(self, action: #selector(MyAppsViewController.presentInactiveAppsAlert), for: .primaryActionTriggered)
|
||||
}
|
||||
|
||||
@@ -1681,7 +1671,6 @@ extension MyAppsViewController
|
||||
}
|
||||
|
||||
let jitAction = UIAction(title: NSLocalizedString("Enable JIT", comment: ""), image: UIImage(systemName: "bolt")) { (action) in
|
||||
guard #available(iOS 14, *) else { return }
|
||||
self.enableJIT(for: installedApp)
|
||||
}
|
||||
|
||||
@@ -1731,7 +1720,7 @@ extension MyAppsViewController
|
||||
actions.append(activateAction)
|
||||
}
|
||||
|
||||
if installedApp.isActive, #available(iOS 14, *)
|
||||
if installedApp.isActive
|
||||
{
|
||||
actions.append(jitAction)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user