Skip to content

Commit

Permalink
fix: Chip color not updated on delete
Browse files Browse the repository at this point in the history
  • Loading branch information
Lnamw committed Aug 29, 2023
1 parent 63075b7 commit 3e43f34
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Mail/Components/RecipientChipLabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ struct RecipientChipLabelView: UIViewRepresentable {

func updateUIView(_ uiLabel: RecipientChipLabel, context: Context) {
uiLabel.text = recipient.name.isEmpty ? recipient.email : recipient.name
uiLabel.isExternal = recipient.isExternal(mailboxManager: mailboxManager)
uiLabel.isUserInteractionEnabled = isEnabled
uiLabel.updateColors(isFirstResponder: uiLabel.isFirstResponder)
}
}

Expand Down Expand Up @@ -108,7 +110,7 @@ class RecipientChipLabel: UILabel, UIKeyInput {
removeHandler?()
}

private func updateColors(isFirstResponder: Bool) {
public func updateColors(isFirstResponder: Bool) {
if isExternal {
textColor = isFirstResponder ? MailResourcesAsset.onTagColor.color : MailResourcesAsset.textPrimaryColor.color
borderColor = MailResourcesAsset.yellowColor.color
Expand Down

0 comments on commit 3e43f34

Please sign in to comment.