show all additional information
This commit is contained in:
parent
2632169427
commit
5a0b97b22f
1 changed files with 8 additions and 3 deletions
|
|
@ -28,15 +28,20 @@ class PasswordDetailTableViewController: UITableViewController {
|
||||||
tableView.register(UINib(nibName: "LabelTableViewCell", bundle: nil), forCellReuseIdentifier: "labelCell")
|
tableView.register(UINib(nibName: "LabelTableViewCell", bundle: nil), forCellReuseIdentifier: "labelCell")
|
||||||
let password = passwordEntity!.decrypt()!
|
let password = passwordEntity!.decrypt()!
|
||||||
|
|
||||||
|
var tableDataIndex = 0
|
||||||
tableData.append(TableSection(title: "", item: []))
|
tableData.append(TableSection(title: "", item: []))
|
||||||
if let username = password.additions["Username"] {
|
if let username = password.additions["Username"] {
|
||||||
tableData[0].item.append(TableCell(title: "username", content: username))
|
tableData[tableDataIndex].item.append(TableCell(title: "username", content: username))
|
||||||
password.additions.removeValue(forKey: "Username")
|
password.additions.removeValue(forKey: "Username")
|
||||||
}
|
}
|
||||||
tableData[0].item.append(TableCell(title: "password", content: password.password))
|
tableData[tableDataIndex].item.append(TableCell(title: "password", content: password.password))
|
||||||
|
|
||||||
if password.additions.count > 0 {
|
if password.additions.count > 0 {
|
||||||
tableData.append(TableSection(title: "additions", item: []))
|
tableData.append(TableSection(title: "additions", item: []))
|
||||||
|
tableDataIndex += 1
|
||||||
|
for (key, value) in password.additions {
|
||||||
|
tableData[tableDataIndex].item.append(TableCell(title: key, content: value))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue