From 3942528cc1e38fd65b0a41d8b431d11898ef35b0 Mon Sep 17 00:00:00 2001 From: Shivek Khurana Date: Wed, 25 Aug 2021 15:49:39 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=99=88=20Hide=20delete=20message=20button?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Shivek Khurana --- .env.release | 1 + src/status_im/ui/screens/chat/message/message.cljs | 3 ++- src/status_im/utils/config.cljs | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.env.release b/.env.release index e5666cfadc..832beaf9ac 100644 --- a/.env.release +++ b/.env.release @@ -20,3 +20,4 @@ MAX_IMAGES_BATCH=1 ENABLE_REFERRAL_INVITE=0 METRICS_ENABLED=0 EIP1559_ENABLED=1 +DELETE_MESSAGE_ENABLED=0 \ No newline at end of file diff --git a/src/status_im/ui/screens/chat/message/message.cljs b/src/status_im/ui/screens/chat/message/message.cljs index 1861e3aab2..a184dd05f7 100644 --- a/src/status_im/ui/screens/chat/message/message.cljs +++ b/src/status_im/ui/screens/chat/message/message.cljs @@ -19,6 +19,7 @@ [status-im.ui.screens.chat.message.reactions :as reactions] [status-im.ui.screens.chat.image.preview.views :as preview] [quo.core :as quo] + [status-im.utils.config :as config] [reagent.core :as reagent] [status-im.ui.screens.chat.components.reply :as components.reply] [status-im.ui.screens.chat.message.link-preview :as link-preview] @@ -401,7 +402,7 @@ [{:on-press #(pin-message message) :label (if pinned (i18n/label :t/unpin) (i18n/label :t/pin)) :id (if pinned :unpin :pin)}]) - (when outgoing + (when (and outgoing config/delete-message-enabled?) [{:on-press #(re-frame/dispatch [:chat.ui/soft-delete-message message]) :label (i18n/label :t/delete) :id :delete}])))) diff --git a/src/status_im/utils/config.cljs b/src/status_im/utils/config.cljs index 98f8692fd5..64e2ad8570 100644 --- a/src/status_im/utils/config.cljs +++ b/src/status_im/utils/config.cljs @@ -50,6 +50,7 @@ (def debug-webview? (enabled? (get-config :DEBUG_WEBVIEW "0"))) (def metrics-enabled? (enabled? (get-config :METRICS_ENABLED "0"))) (def eip1559-enabled? (enabled? (get-config :EIP1559_ENABLED "0"))) +(def delete-message-enabled? (enabled? (get-config :DELETE_MESSAGE_ENABLED "0"))) ;; CONFIG VALUES (def log-level