Fix some issues may cause crash
This commit is contained in:
parent
dbfbd73d75
commit
b1ef8a343f
1 changed files with 7 additions and 9 deletions
|
|
@ -164,11 +164,7 @@ class PasswordDetailTableViewController: UITableViewController, UIGestureRecogni
|
||||||
DispatchQueue.main.async { [weak self] in
|
DispatchQueue.main.async { [weak self] in
|
||||||
self?.indicator.stopAnimating()
|
self?.indicator.stopAnimating()
|
||||||
self?.setTableData()
|
self?.setTableData()
|
||||||
UIView.performWithoutAnimation {
|
self?.tableView.reloadData()
|
||||||
self?.tableView.reloadData()
|
|
||||||
// add layoutIfNeeded solves the "flickering problem" during refresh
|
|
||||||
self?.tableView.layoutIfNeeded()
|
|
||||||
}
|
|
||||||
self?.editUIBarButtonItem.isEnabled = true
|
self?.editUIBarButtonItem.isEnabled = true
|
||||||
if let urlString = self?.password?.getURLString() {
|
if let urlString = self?.password?.getURLString() {
|
||||||
if self?.passwordEntity?.image == nil {
|
if self?.passwordEntity?.image == nil {
|
||||||
|
|
@ -432,11 +428,13 @@ class PasswordDetailTableViewController: UITableViewController, UIGestureRecogni
|
||||||
case .name:
|
case .name:
|
||||||
let cell = tableView.dequeueReusableCell(withIdentifier: "passwordDetailTitleTableViewCell", for: indexPath) as! PasswordDetailTitleTableViewCell
|
let cell = tableView.dequeueReusableCell(withIdentifier: "passwordDetailTitleTableViewCell", for: indexPath) as! PasswordDetailTitleTableViewCell
|
||||||
cell.passwordImageImageView.image = passwordImage ?? #imageLiteral(resourceName: "PasswordImagePlaceHolder")
|
cell.passwordImageImageView.image = passwordImage ?? #imageLiteral(resourceName: "PasswordImagePlaceHolder")
|
||||||
var passwordName = passwordEntity!.name!
|
if let passwordName = passwordEntity!.name {
|
||||||
if passwordEntity!.synced == false {
|
if passwordEntity!.synced == false {
|
||||||
passwordName = "\(passwordName) ↻"
|
cell.nameLabel.text = "\(passwordName) ↻"
|
||||||
|
} else {
|
||||||
|
cell.nameLabel.text = passwordName
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cell.nameLabel.text = passwordName
|
|
||||||
cell.categoryLabel.text = passwordCategoryText
|
cell.categoryLabel.text = passwordCategoryText
|
||||||
cell.selectionStyle = .none
|
cell.selectionStyle = .none
|
||||||
return cell
|
return cell
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue