diff --git a/src/status_im/contact/block.cljs b/src/status_im/contact/block.cljs index 0c8af551a2..3338309864 100644 --- a/src/status_im/contact/block.cljs +++ b/src/status_im/contact/block.cljs @@ -37,7 +37,9 @@ (let [fxs (map #(clean-up-chat public-key %) chats)] (apply fx/merge cofx - {:db (update db :chats dissoc public-key)} + {:db (-> db + (update :chats dissoc public-key) + (assoc-in [:contacts/contacts public-key :added] false))} fxs))) (fx/defn block-contact @@ -46,7 +48,9 @@ (let [contact (-> (contact.db/public-key->contact (:contacts/contacts db) public-key) - (assoc :last-updated now :blocked true)) + (assoc :last-updated now + :blocked true + :added false)) from-one-to-one-chat? (not (get-in db [:chats (:current-chat-id db) :group-chat]))] (fx/merge cofx {:db (-> db @@ -62,7 +66,7 @@ (navigation/navigate-back))))) (fx/defn unblock-contact - {:events [:contact.ui/unblock-contact-pressed]} + {:events [:contact.ui/unblock-contact-pressed ::contact-unblocked]} [{:keys [db now] :as cofx} public-key] (let [contact (-> (get-in db [:contacts/contacts public-key]) (assoc :last-updated now :blocked false))] diff --git a/src/status_im/contact/core.cljs b/src/status_im/contact/core.cljs index 2f226e5e9f..1d33a8772b 100644 --- a/src/status_im/contact/core.cljs +++ b/src/status_im/contact/core.cljs @@ -55,7 +55,10 @@ (conj [:offload-messages constants/timeline-chat-id]) (:blocked contact) - (conj [::contact.block/contact-blocked contact chats]))) + (conj [::contact.block/contact-blocked contact chats]) + + (contact.db/blocked? db public-key) + (conj [::contact.block/contact-unblocked public-key]))) contacts)}) (fx/defn upsert-contact diff --git a/src/status_im/contact/db.cljs b/src/status_im/contact/db.cljs index c9fd5f3a4f..2c31c9f2f9 100644 --- a/src/status_im/contact/db.cljs +++ b/src/status_im/contact/db.cljs @@ -79,8 +79,8 @@ (added? (get-in db [:contacts/contacts public-key])))) (defn blocked? - ([{:keys [system-tags]}] - (contains? system-tags :contact/blocked)) + ([contact] + (:blocked contact)) ([db public-key] (blocked? (get-in db [:contacts/contacts public-key])))) diff --git a/status-go-version.json b/status-go-version.json index 5b26b68627..24d44c4c9a 100644 --- a/status-go-version.json +++ b/status-go-version.json @@ -3,7 +3,7 @@ "_comment": "Instead use: scripts/update-status-go.sh ", "owner": "status-im", "repo": "status-go", - "version": "v0.89.7", - "commit-sha1": "4de912babad60c8ac556277ffc79026fc4cabdc4", - "src-sha256": "17lkgq6rciq1snnxjflxy6wqianyi0wkgjdk6rplz5yy2y91rv7v" + "version": "v0.89.8", + "commit-sha1": "e77371d7d2154128d84c9607895c13620b20b260", + "src-sha256": "1w8m3391xdlv29spvzlavp3f47rzvi8syk6q9nklr028l67ib0qd" }