Fix Error Log showing UIAlertController on iOS 14+

This commit is contained in:
nythepegasus
2024-05-06 20:21:15 -04:00
committed by ny
parent 1a36726361
commit 9b7c0387cf

View File

@@ -111,6 +111,7 @@ private extension ErrorLogViewController
cell.menuButton.menu = menu
cell.menuButton.showsMenuAsPrimaryAction = self.isScrolling ? false : true
cell.selectionStyle = .none
}
// Include errorDescriptionTextView's text in cell summary.
@@ -266,6 +267,7 @@ extension ErrorLogViewController
{
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)
{
guard #unavailable(iOS 14) else { return }
let loggedError = self.dataSource.item(at: indexPath)
let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
@@ -364,14 +366,7 @@ extension ErrorLogViewController
for case let cell as ErrorLogTableViewCell in self.tableView.visibleCells
{
if self.isScrolling
{
cell.menuButton.showsMenuAsPrimaryAction = false
}
else
{
cell.menuButton.showsMenuAsPrimaryAction = true
}
cell.menuButton.showsMenuAsPrimaryAction = self.isScrolling ? false : true
}
}
}