tweak: if current user reacts then their username should appear as ‘You’

pull/638/head
ryanzhao 3 years ago
parent 0a9856d49a
commit 95cd516bce

@ -122,12 +122,16 @@ final class UserCell: UITableViewCell {
.systemFont(ofSize: Values.mediumFontSize) : .systemFont(ofSize: Values.mediumFontSize) :
.boldSystemFont(ofSize: Values.mediumFontSize) .boldSystemFont(ofSize: Values.mediumFontSize)
) )
displayNameLabel.text = Profile.displayName(
displayNameLabel.text = (getUserHexEncodedPublicKey() == publicKey ?
"MEDIA_GALLERY_SENDER_NAME_YOU".localized() :
Profile.displayName(
for: .contact, for: .contact,
id: publicKey, id: publicKey,
name: profile?.name, name: profile?.name,
nickname: profile?.nickname nickname: profile?.nickname
) )
)
switch accessory { switch accessory {
case .none: accessoryImageView.isHidden = true case .none: accessoryImageView.isHidden = true

Loading…
Cancel
Save