[16469] Fix conditional of selection user's name in confirmation drawer (#16489)

This commit is contained in:
Ibrahem Khalil 2023-07-05 20:06:19 +03:00 committed by GitHub
parent f047665f75
commit abe653c086
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -33,10 +33,14 @@
(let [{:keys [group-chat chat-id public-key color (let [{:keys [group-chat chat-id public-key color
profile-picture name]} context profile-picture name]} context
id (or chat-id public-key) id (or chat-id public-key)
display-name (or contact-name-by-identity (when-not group-chat
(when-not group-chat (rf/sub [:contacts/contact-name-by-identity id]))
(rf/sub [:contacts/contact-name-by-identity id])) display-name (cond
name) (= contact-name-by-identity
"Unknown") name
(= contact-name-by-identity
nil) name
:else contact-name-by-identity)
contact (when-not group-chat contact (when-not group-chat
(rf/sub [:contacts/contact-by-address (rf/sub [:contacts/contact-by-address
id])) id]))