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
|
||||
[db chat-id]
|
||||
(update-in db
|
||||
[:chats chat-id]
|
||||
assoc
|
||||
:unviewed-messages-count 0
|
||||
:unviewed-mentions-count 0
|
||||
:highlight false))
|
||||
(when (get-in db [:chats chat-id])
|
||||
(update-in
|
||||
db
|
||||
[:chats chat-id]
|
||||
assoc
|
||||
:unviewed-messages-count 0
|
||||
:unviewed-mentions-count 0
|
||||
:highlight false)))
|
||||
|
||||
(rf/defn handle-mark-all-read-successful
|
||||
{:events [::mark-all-read-successful]}
|
||||
|
|
|
@ -18,8 +18,9 @@
|
|||
:chat current-chat
|
||||
:header-comp (fn [{:keys [scroll-y]}]
|
||||
[messages.navigation/navigation-view {:scroll-y scroll-y}])
|
||||
:footer-comp (fn [{:keys [insets]}]
|
||||
(if-not able-to-send-message?
|
||||
[contact-requests.bottom-drawer/view chat-id contact-request-state
|
||||
group-chat]
|
||||
[:f> composer/composer insets]))}]))
|
||||
:footer-comp (when (some? able-to-send-message?)
|
||||
(fn [{:keys [insets]}]
|
||||
(if-not able-to-send-message?
|
||||
[contact-requests.bottom-drawer/view chat-id contact-request-state
|
||||
group-chat]
|
||||
[:f> composer/composer insets])))}]))
|
||||
|
|
Loading…
Reference in New Issue