Format code with SwiftFormat

This commit is contained in:
Danny Moesch 2021-01-31 13:17:37 +01:00 committed by Mingshen Sun
parent 4d6c77371d
commit ad4ed9419e
16 changed files with 49 additions and 49 deletions

View file

@ -1,6 +1,6 @@
import UIKit
import passKit
import SVProgressHUD
import UIKit
class PasswordManager {
weak var viewController: UIViewController?

View file

@ -6,8 +6,8 @@
// Copyright © 2021 Bob Sun. All rights reserved.
//
import UIKit
import passKit
import UIKit
struct Section {
var title: String
@ -22,19 +22,19 @@ class PasswordNavigationDataSource: NSObject, UITableViewDataSource {
let hideSectionHeaderThreshold = 6
init(entries: [PasswordTableEntry] = []) {
sections = buildSections(from: entries)
filteredSections = sections
self.sections = buildSections(from: entries)
self.filteredSections = sections
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
func tableView(_: UITableView, numberOfRowsInSection section: Int) -> Int {
filteredSections[section].entries.count
}
func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
func tableView(_: UITableView, titleForHeaderInSection section: Int) -> String? {
showSectionTitles() ? filteredSections[section].title : nil
}
func tableView(_ tableView: UITableView, sectionForSectionIndexTitle title: String, at index: Int) -> Int {
func tableView(_: UITableView, sectionForSectionIndexTitle _: String, at index: Int) -> Int {
index
}
@ -45,7 +45,7 @@ class PasswordNavigationDataSource: NSObject, UITableViewDataSource {
return cell
}
func numberOfSections(in tableView: UITableView) -> Int {
func numberOfSections(in _: UITableView) -> Int {
filteredSections.count
}