🙈 Hide delete message button

Signed-off-by: Shivek Khurana <shivek@status.im>
This commit is contained in:
Shivek Khurana 2021-08-25 15:49:39 +05:30
parent 2f0e0af1a1
commit 3942528cc1
No known key found for this signature in database
GPG Key ID: 9BEB56E6E62968C7
3 changed files with 4 additions and 1 deletions

View File

@ -20,3 +20,4 @@ MAX_IMAGES_BATCH=1
ENABLE_REFERRAL_INVITE=0 ENABLE_REFERRAL_INVITE=0
METRICS_ENABLED=0 METRICS_ENABLED=0
EIP1559_ENABLED=1 EIP1559_ENABLED=1
DELETE_MESSAGE_ENABLED=0

View File

@ -19,6 +19,7 @@
[status-im.ui.screens.chat.message.reactions :as reactions] [status-im.ui.screens.chat.message.reactions :as reactions]
[status-im.ui.screens.chat.image.preview.views :as preview] [status-im.ui.screens.chat.image.preview.views :as preview]
[quo.core :as quo] [quo.core :as quo]
[status-im.utils.config :as config]
[reagent.core :as reagent] [reagent.core :as reagent]
[status-im.ui.screens.chat.components.reply :as components.reply] [status-im.ui.screens.chat.components.reply :as components.reply]
[status-im.ui.screens.chat.message.link-preview :as link-preview] [status-im.ui.screens.chat.message.link-preview :as link-preview]
@ -401,7 +402,7 @@
[{:on-press #(pin-message message) [{:on-press #(pin-message message)
:label (if pinned (i18n/label :t/unpin) (i18n/label :t/pin)) :label (if pinned (i18n/label :t/unpin) (i18n/label :t/pin))
:id (if pinned :unpin :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]) [{:on-press #(re-frame/dispatch [:chat.ui/soft-delete-message message])
:label (i18n/label :t/delete) :label (i18n/label :t/delete)
:id :delete}])))) :id :delete}]))))

View File

@ -50,6 +50,7 @@
(def debug-webview? (enabled? (get-config :DEBUG_WEBVIEW "0"))) (def debug-webview? (enabled? (get-config :DEBUG_WEBVIEW "0")))
(def metrics-enabled? (enabled? (get-config :METRICS_ENABLED "0"))) (def metrics-enabled? (enabled? (get-config :METRICS_ENABLED "0")))
(def eip1559-enabled? (enabled? (get-config :EIP1559_ENABLED "0"))) (def eip1559-enabled? (enabled? (get-config :EIP1559_ENABLED "0")))
(def delete-message-enabled? (enabled? (get-config :DELETE_MESSAGE_ENABLED "0")))
;; CONFIG VALUES ;; CONFIG VALUES
(def log-level (def log-level