parent
d2e8c5b52c
commit
55d11d1a18
|
@ -73,8 +73,18 @@
|
||||||
:icon-color (colors/theme-colors colors/neutral-50 colors/neutral-40)
|
:icon-color (colors/theme-colors colors/neutral-50 colors/neutral-40)
|
||||||
:accessibility-label :start-a-new-chat
|
:accessibility-label :start-a-new-chat
|
||||||
:icon :i/new-message
|
:icon :i/new-message
|
||||||
:on-press #(hide-sheet-and-dispatch [:bottom-sheet/show-sheet
|
:on-press (fn [] ;; Note: currently the bottom button is overlapping with
|
||||||
:start-a-new-chat])}]
|
;; 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
|
[quo2/menu-item
|
||||||
{:theme :main
|
{:theme :main
|
||||||
:title (i18n/label :t/add-a-contact)
|
:title (i18n/label :t/add-a-contact)
|
||||||
|
|
|
@ -58,9 +58,8 @@
|
||||||
(defn contact-selection-list
|
(defn contact-selection-list
|
||||||
[]
|
[]
|
||||||
(let [contacts (rf/sub
|
(let [contacts (rf/sub
|
||||||
[:contacts/sorted-and-grouped-by-first-letter])
|
[:contacts/grouped-by-first-letter])
|
||||||
selected-contacts-count (rf/sub [:selected-contacts-count])
|
selected-contacts-count (rf/sub [:selected-contacts-count])
|
||||||
window-height (rf/sub [:dimensions/window-height])
|
|
||||||
one-contact-selected? (= selected-contacts-count 1)
|
one-contact-selected? (= selected-contacts-count 1)
|
||||||
contacts-selected? (pos? selected-contacts-count)
|
contacts-selected? (pos? selected-contacts-count)
|
||||||
{:keys [names public-key]} (-> contacts first :data first)
|
{:keys [names public-key]} (-> contacts first :data first)
|
||||||
|
@ -68,7 +67,7 @@
|
||||||
{:keys [nickname ens-name three-words-name]} names
|
{:keys [nickname ens-name three-words-name]} names
|
||||||
first-username (or ens-name nickname three-words-name)
|
first-username (or ens-name nickname three-words-name)
|
||||||
no-contacts? (empty? contacts)]
|
no-contacts? (empty? contacts)]
|
||||||
[react/view {:style {:height (* window-height 0.95)}}
|
[react/view {:style {:flex 1}}
|
||||||
[quo2/button
|
[quo2/button
|
||||||
{:type :grey
|
{:type :grey
|
||||||
:icon true
|
:icon true
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
(defn contact-list
|
(defn contact-list
|
||||||
[data]
|
[data]
|
||||||
(let [contacts (if (:group 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]))]
|
(rf/sub [:contacts/filtered-active-sections]))]
|
||||||
[rn/section-list
|
[rn/section-list
|
||||||
{:key-fn :title
|
{:key-fn :title
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
vals)))
|
vals)))
|
||||||
|
|
||||||
(re-frame/reg-sub
|
(re-frame/reg-sub
|
||||||
:contacts/add-members-sections
|
:contacts/grouped-by-first-letter
|
||||||
:<- [:contacts/current-chat-contacts]
|
:<- [:contacts/current-chat-contacts]
|
||||||
:<- [:contacts/active]
|
:<- [:contacts/active]
|
||||||
(fn [[members contacts]]
|
(fn [[members contacts]]
|
||||||
|
|
Loading…
Reference in New Issue