parent
d2e8c5b52c
commit
55d11d1a18
|
@ -73,8 +73,18 @@
|
|||
:icon-color (colors/theme-colors colors/neutral-50 colors/neutral-40)
|
||||
:accessibility-label :start-a-new-chat
|
||||
:icon :i/new-message
|
||||
:on-press #(hide-sheet-and-dispatch [:bottom-sheet/show-sheet
|
||||
:start-a-new-chat])}]
|
||||
:on-press (fn [] ;; Note: currently the bottom button is overlapping with
|
||||
;; safe-area
|
||||
;; because it is using old bottom-sheet
|
||||
(rf/dispatch [:bottom-sheet/hide])
|
||||
;; A one second delay is needed because there are 2 bottom-sheets here
|
||||
;; It would better to migrate contact-selection-list component to use
|
||||
;; a screen
|
||||
(js/setTimeout #(rf/dispatch [:bottom-sheet/show-sheet
|
||||
{:content
|
||||
new-chat-aio/contact-selection-list}])
|
||||
1000))
|
||||
}]
|
||||
[quo2/menu-item
|
||||
{:theme :main
|
||||
:title (i18n/label :t/add-a-contact)
|
||||
|
|
|
@ -58,9 +58,8 @@
|
|||
(defn contact-selection-list
|
||||
[]
|
||||
(let [contacts (rf/sub
|
||||
[:contacts/sorted-and-grouped-by-first-letter])
|
||||
[:contacts/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)
|
||||
|
@ -68,7 +67,7 @@
|
|||
{:keys [nickname ens-name three-words-name]} names
|
||||
first-username (or ens-name nickname three-words-name)
|
||||
no-contacts? (empty? contacts)]
|
||||
[react/view {:style {:height (* window-height 0.95)}}
|
||||
[react/view {:style {:flex 1}}
|
||||
[quo2/button
|
||||
{:type :grey
|
||||
:icon true
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
(defn contact-list
|
||||
[data]
|
||||
(let [contacts (if (:group data)
|
||||
(rf/sub [:contacts/add-members-sections])
|
||||
(rf/sub [:contacts/grouped-by-first-letter])
|
||||
(rf/sub [:contacts/filtered-active-sections]))]
|
||||
[rn/section-list
|
||||
{:key-fn :title
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
vals)))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:contacts/add-members-sections
|
||||
:contacts/grouped-by-first-letter
|
||||
:<- [:contacts/current-chat-contacts]
|
||||
:<- [:contacts/active]
|
||||
(fn [[members contacts]]
|
||||
|
|
Loading…
Reference in New Issue