Fix lint issues.

This commit is contained in:
Brent Simmons
2025-01-22 22:18:09 -08:00
parent 40ada2ba5a
commit bbef99f2d3
92 changed files with 1651 additions and 1694 deletions

View File

@@ -15,15 +15,15 @@ protocol AddFeedFolderViewControllerDelegate {
}
class AddFeedFolderViewController: UITableViewController {
var delegate: AddFeedFolderViewControllerDelegate?
var initialContainer: Container?
var containers = [Container]()
override func viewDidLoad() {
super.viewDidLoad()
let sortedActiveAccounts = AccountManager.shared.sortedActiveAccounts
for account in sortedActiveAccounts {
@@ -53,15 +53,15 @@ class AddFeedFolderViewController: UITableViewController {
return tableView.dequeueReusableCell(withIdentifier: "FolderCell", for: indexPath) as! AddComboTableViewCell
}
}()
if let smallIconProvider = container as? SmallIconProvider {
cell.icon?.image = smallIconProvider.smallIcon?.image
}
if let displayNameProvider = container as? DisplayNameProvider {
cell.label?.text = displayNameProvider.nameForDisplay
}
if let compContainer = initialContainer, container === compContainer {
cell.accessoryType = .checkmark
} else {
@@ -73,7 +73,7 @@ class AddFeedFolderViewController: UITableViewController {
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let container = containers[indexPath.row]
if let account = container as? Account, account.behaviors.contains(.disallowFeedInRootFolder) {
tableView.selectRow(at: nil, animated: false, scrollPosition: .none)
} else {
@@ -83,19 +83,19 @@ class AddFeedFolderViewController: UITableViewController {
dismiss()
}
}
// MARK: Actions
@IBAction func cancel(_ sender: Any) {
dismiss()
}
}
private extension AddFeedFolderViewController {
func dismiss() {
dismiss(animated: true)
}
}