From 0ed39a42efe11189bfb52de794fb257a9db8b46c Mon Sep 17 00:00:00 2001 From: Parvesh Monu Date: Tue, 25 Jun 2024 13:48:53 +0530 Subject: [PATCH] fix "Remove from contacts" is available when the user is not your contact (#20541) --- src/status_im/common/home/actions/view.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/status_im/common/home/actions/view.cljs b/src/status_im/common/home/actions/view.cljs index ce014c7693..8e540d5290 100644 --- a/src/status_im/common/home/actions/view.cljs +++ b/src/status_im/common/home/actions/view.cljs @@ -448,7 +448,7 @@ (destructive-actions item inside-chat?)])]) (defn contact-actions - [{:keys [public-key] :as contact} {:keys [chat-id admin?] :as extra-data}] + [{:keys [public-key added?] :as contact} {:keys [chat-id admin?] :as extra-data}] (let [current-pub-key (rf/sub [:multiaccount/public-key])] [quo/action-drawer [[(view-profile-entry public-key) @@ -459,7 +459,7 @@ [(when-not (= current-pub-key public-key) (when config/show-not-implemented-features? (mark-untrustworthy-entry))) - (when-not (= current-pub-key public-key) (remove-from-contacts-entry contact)) + (when added? (remove-from-contacts-entry contact)) (when-not (= current-pub-key public-key) (block-user-entry contact))] (when (and admin? chat-id) [(if (= current-pub-key public-key)