Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide email in "New chat"-list for trusted contacts #2282

Merged
merged 3 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deltachat-ios/Chat/ChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ class ChatViewController: UITableViewController, UITableViewDropDelegate {
let dcContact = dcContext.getContact(id: chatContactIds[0])
if dcContact.isBot {
subtitle = String.localized("bot")
} else if !dcChat.isProtected {
} else if dcChat.isProtected == false {
subtitle = dcContact.email
} else {
subtitle = nil
Expand Down
8 changes: 8 additions & 0 deletions deltachat-ios/View/ContactCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,12 @@ class ContactCell: UITableViewCell {
fatalError("init(coder:) has not been implemented")
}

override func prepareForReuse() {
super.prepareForReuse()

subtitleLabel.isHidden = false
}

private func setupSubviews() {
let margin: CGFloat = 10
isAccessibilityElement = true
Expand Down Expand Up @@ -401,6 +407,8 @@ class ContactCell: UITableViewCell {
case .contact(let contactData):
let contact = cellViewModel.dcContext.getContact(id: contactData.contactId)
titleLabel.attributedText = cellViewModel.title.boldAt(indexes: cellViewModel.titleHighlightIndexes, fontSize: titleLabel.font.pointSize)
subtitleLabel.isHidden = contact.isVerified

if let profileImage = contact.profileImage {
avatar.setImage(profileImage)
} else {
Expand Down
Loading