Delete unusable cell controller and corresponding UI, fix alignment issue

This commit is contained in:
Bob Sun 2017-04-02 21:22:14 -07:00
parent 445c52b82e
commit bf501c15bb
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
4 changed files with 9 additions and 93 deletions

View file

@ -219,20 +219,23 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
} else {
cell.textLabel?.text = "\(entry.title)"
cell.accessoryType = .disclosureIndicator
cell.detailTextLabel?.font = UIFont.preferredFont(forTextStyle: .body)
cell.detailTextLabel?.text = "\(entry.passwordEntity?.children?.count ?? 0)"
}
return cell
} else {
let passwordWithFolderCell = tableView.dequeueReusableCell(withIdentifier: "passwordWithFolderTableViewCell", for: indexPath) as! PasswordWithFolderTableViewCell
let cell = tableView.dequeueReusableCell(withIdentifier: "passwordTableViewCell", for: indexPath)
let entry = getPasswordEntry(by: indexPath)
if entry.passwordEntity!.synced {
passwordWithFolderCell.passwordLabel?.text = entry.title
cell.textLabel?.text = entry.title
} else {
passwordWithFolderCell.passwordLabel?.text = "\(entry.title)"
cell.textLabel?.text = "\(entry.title)"
}
passwordWithFolderCell.folderLabel.text = entry.passwordEntity?.getCategoryText()
passwordWithFolderCell.addGestureRecognizer(longPressGestureRecognizer)
return passwordWithFolderCell
cell.accessoryType = .none
cell.detailTextLabel?.font = UIFont.preferredFont(forTextStyle: .footnote)
cell.detailTextLabel?.text = entry.passwordEntity?.getCategoryText()
cell.addGestureRecognizer(longPressGestureRecognizer)
return cell
}
}