Don't display "Add Unknown as contact to send a Message" if chat is not loaded
This commit is contained in:
parent
72455877bd
commit
77fc7a92d9
|
@ -59,12 +59,14 @@
|
||||||
|
|
||||||
(defn mark-chat-all-read
|
(defn mark-chat-all-read
|
||||||
[db chat-id]
|
[db chat-id]
|
||||||
(update-in db
|
(when (get-in db [:chats chat-id])
|
||||||
[:chats chat-id]
|
(update-in
|
||||||
assoc
|
db
|
||||||
:unviewed-messages-count 0
|
[:chats chat-id]
|
||||||
:unviewed-mentions-count 0
|
assoc
|
||||||
:highlight false))
|
:unviewed-messages-count 0
|
||||||
|
:unviewed-mentions-count 0
|
||||||
|
:highlight false)))
|
||||||
|
|
||||||
(rf/defn handle-mark-all-read-successful
|
(rf/defn handle-mark-all-read-successful
|
||||||
{:events [::mark-all-read-successful]}
|
{:events [::mark-all-read-successful]}
|
||||||
|
|
|
@ -18,8 +18,9 @@
|
||||||
:chat current-chat
|
:chat current-chat
|
||||||
:header-comp (fn [{:keys [scroll-y]}]
|
:header-comp (fn [{:keys [scroll-y]}]
|
||||||
[messages.navigation/navigation-view {:scroll-y scroll-y}])
|
[messages.navigation/navigation-view {:scroll-y scroll-y}])
|
||||||
:footer-comp (fn [{:keys [insets]}]
|
:footer-comp (when (some? able-to-send-message?)
|
||||||
(if-not able-to-send-message?
|
(fn [{:keys [insets]}]
|
||||||
[contact-requests.bottom-drawer/view chat-id contact-request-state
|
(if-not able-to-send-message?
|
||||||
group-chat]
|
[contact-requests.bottom-drawer/view chat-id contact-request-state
|
||||||
[:f> composer/composer insets]))}]))
|
group-chat]
|
||||||
|
[:f> composer/composer insets])))}]))
|
||||||
|
|
Loading…
Reference in New Issue