ios: text color of group invitation in chat list (#3703)

* ios: text color of group invitation in chat list

* refactor

---------

Co-authored-by: Avently <avently@local>
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
This commit is contained in:
Stanislav Dmitrenko 2024-01-19 02:14:18 +07:00 committed by GitHub
parent ec57529f12
commit 2dae9180ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,11 +93,11 @@ struct ChatPreviewView: View {
case let .direct(contact):
previewTitle(contact.verified == true ? verifiedIcon + t : t).foregroundColor(deleting ? Color.secondary : nil)
case let .group(groupInfo):
let v = previewTitle(t).foregroundColor(deleting ? Color.secondary : nil)
let v = previewTitle(t)
switch (groupInfo.membership.memberStatus) {
case .memInvited: v.foregroundColor(deleting ? .secondary : chat.chatInfo.incognito ? .indigo : .accentColor)
case .memAccepted: v.foregroundColor(.secondary)
default: v.foregroundColor(deleting ? Color.secondary : nil)
default: if deleting { v.foregroundColor(.secondary) } else { v }
}
default: previewTitle(t)
}