mirror of
https://github.com/status-im/status-react.git
synced 2025-01-11 03:26:31 +00:00
fix new chat selected contact (#15124)
This commit is contained in:
parent
900688dc15
commit
fb155ea4bd
@ -8,6 +8,7 @@
|
||||
[utils.i18n :as i18n]
|
||||
[react-native.core :as rn]
|
||||
[utils.re-frame :as rf]
|
||||
[clojure.string :as string]
|
||||
[status-im2.common.contact-list.view :as contact-list]
|
||||
[quo2.components.markdown.text :as text]
|
||||
[status-im.ui.components.invite.events :as invite.events]
|
||||
@ -62,17 +63,24 @@
|
||||
[]
|
||||
[:f>
|
||||
(fn []
|
||||
(let [contacts (rf/sub
|
||||
[:contacts/sorted-and-grouped-by-first-letter])
|
||||
selected-contacts-count (rf/sub [:selected-contacts-count])
|
||||
window-height (rf/sub [:dimensions/window-height])
|
||||
one-contact-selected? (= selected-contacts-count 1)
|
||||
contacts-selected? (pos? selected-contacts-count)
|
||||
{:keys [names public-key]} (-> contacts first :data first)
|
||||
added? (reagent/atom '())
|
||||
{:keys [nickname ens-name three-words-name]} names
|
||||
first-username (or ens-name nickname three-words-name)
|
||||
no-contacts? (empty? contacts)]
|
||||
(let [contacts (rf/sub
|
||||
[:contacts/sorted-and-grouped-by-first-letter])
|
||||
selected-contacts-count (rf/sub [:selected-contacts-count])
|
||||
selected-contacts (rf/sub [:group/selected-contacts])
|
||||
window-height (rf/sub [:dimensions/window-height])
|
||||
one-contact-selected? (= selected-contacts-count 1)
|
||||
contacts-selected? (pos? selected-contacts-count)
|
||||
{:keys [names public-key]} (when one-contact-selected?
|
||||
(rf/sub [:contacts/contact-by-identity
|
||||
(first selected-contacts)]))
|
||||
added? (reagent/atom '())
|
||||
{:keys [nickname ens-name display-name
|
||||
three-words-name]} names
|
||||
first-username (or nickname
|
||||
ens-name
|
||||
(when-not (string/blank? display-name) display-name)
|
||||
three-words-name)
|
||||
no-contacts? (empty? contacts)]
|
||||
[rn/view {:style {:height (* window-height 0.9)}}
|
||||
[quo2/button
|
||||
{:type :grey
|
||||
|
Loading…
x
Reference in New Issue
Block a user