[#12731] Blank space in place of 1-1 chat with a blocked user on the home screen

Signed-off-by: andrey <motor4ik@gmail.com>
This commit is contained in:
andrey 2021-10-21 12:53:54 +02:00
parent 8f5d3df215
commit cd30a04626
No known key found for this signature in database
GPG Key ID: 89B67245FD2F0272
2 changed files with 6 additions and 1 deletions

View File

@ -39,6 +39,7 @@
cofx cofx
{:db (-> db {:db (-> db
(update :chats dissoc public-key) (update :chats dissoc public-key)
(update :chats-home-list disj public-key)
(assoc-in [:contacts/contacts public-key :added] false))} (assoc-in [:contacts/contacts public-key :added] false))}
fxs))) fxs)))

View File

@ -861,7 +861,11 @@
:<- [::chats] :<- [::chats]
:<- [:chats-home-list] :<- [:chats-home-list]
(fn [[chats active-chats]] (fn [[chats active-chats]]
(map #(get chats %) active-chats))) (reduce #(if-let [item (get chats %2)]
(conj %1 item)
%1)
[]
active-chats)))
(re-frame/reg-sub (re-frame/reg-sub
:chat-by-id :chat-by-id