From aa8f5b3d48a8d4b5ee2a3d7373675d4150634126 Mon Sep 17 00:00:00 2001 From: Ibrahem Khalil Date: Sat, 14 Jan 2023 12:57:45 +0200 Subject: [PATCH] Disable starting a new chat for non mutual contact (#14726) --- src/status_im/ui/screens/profile/contact/views.cljs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/status_im/ui/screens/profile/contact/views.cljs b/src/status_im/ui/screens/profile/contact/views.cljs index 62b7d6b821..6a468aa82b 100644 --- a/src/status_im/ui/screens/profile/contact/views.cljs +++ b/src/status_im/ui/screens/profile/contact/views.cljs @@ -23,9 +23,10 @@ (:require-macros [status-im.utils.views :as views])) (defn actions - [{:keys [public-key added? blocked? ens-name] :as contact} muted?] + [{:keys [public-key added? blocked? ens-name mutual?] :as contact} muted?] (concat [{:label (i18n/label :t/chat) :icon :main-icons/message + :disabled (not mutual?) :action #(re-frame/dispatch [:contact.ui/send-message-pressed {:public-key public-key :ens-name ens-name}]) @@ -177,6 +178,7 @@ [{:keys [icon label action selected disabled negative]}] [react/touchable-highlight {:on-press action + :disabled disabled :style {:flex 1} :accessibility-label (str label "-item-button")} [react/view {:flex 1 :align-items :center}