Keep SwiftLint rule 'prefixed_toplevel_constant' disabled
This commit is contained in:
parent
f41fd7c551
commit
70d605e412
2 changed files with 5 additions and 7 deletions
|
|
@ -124,7 +124,7 @@ whitelist_rules:
|
|||
- override_in_extension
|
||||
- pattern_matching_keywords
|
||||
- prefer_self_type_over_type_of_self
|
||||
# - prefixed_toplevel_constant
|
||||
# - prefixed_toplevel_constant # Violations are mostly in test code.
|
||||
# - private_action
|
||||
# - private_outlet
|
||||
- private_over_fileprivate
|
||||
|
|
|
|||
|
|
@ -10,9 +10,10 @@ import passKit
|
|||
import SVProgressHUD
|
||||
import UIKit
|
||||
|
||||
private let hideSectionHeaderThreshold = 6 // hide section header if passwords count is less than the threshold
|
||||
|
||||
class PasswordsViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, UITabBarControllerDelegate, UISearchBarDelegate {
|
||||
// Arbitrary threshold to decide whether to show folders or not for only a few entries.
|
||||
private static let hideSectionHeaderThreshold = 6
|
||||
|
||||
private var passwordsTableEntries: [PasswordTableEntry] = []
|
||||
private var passwordsTableAllEntries: [PasswordTableEntry] = []
|
||||
private var parentPasswordEntity: PasswordEntity?
|
||||
|
|
@ -437,10 +438,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
|
|||
}
|
||||
|
||||
private func hideSectionHeader() -> Bool {
|
||||
if passwordsTableEntries.count < hideSectionHeaderThreshold || searchController.isActive {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return passwordsTableEntries.count < Self.hideSectionHeaderThreshold || searchController.isActive
|
||||
}
|
||||
|
||||
func tableView(_: UITableView, titleForHeaderInSection section: Int) -> String? {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue