Hide group chats behind flag

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
janherich 2018-04-30 08:17:31 +02:00 committed by Andrea Maria Piana
parent c145c8a19f
commit 8dd04570e4
No known key found for this signature in database
GPG Key ID: AA6CCA6DE0E06424
6 changed files with 15 additions and 7 deletions

1
.env
View File

@ -19,3 +19,4 @@ TESTFAIRY_TOKEN=969f6c921cb435cea1d41d1ea3f5b247d6026d55
INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c
DEBUG_WEBVIEW=1
INSTABUG_SURVEYS=1
GROUP_CHATS_ENABLED=1

View File

@ -18,3 +18,4 @@ DEFAULT_NETWORK=testnet_rpc
INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c
DEBUG_WEBVIEW=1
INSTABUG_SURVEYS=0
GROUP_CHATS_ENABLED=1

View File

@ -19,3 +19,4 @@ DEFAULT_NETWORK=mainnet_rpc
INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c
DEBUG_WEBVIEW=1
INSTABUG_SURVEYS=1
GROUP_CHATS_ENABLED=1

View File

@ -19,3 +19,4 @@ DEFAULT_NETWORK=testnet_rpc
INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c
DEBUG_WEBVIEW=0
INSTABUG_SURVEYS=1
GROUP_CHATS_ENABLED=0

View File

@ -2,6 +2,7 @@
(:require-macros [status-im.utils.views :as views])
(:require [re-frame.core :as re-frame]
[status-im.i18n :as i18n]
[status-im.utils.config :as config]
[status-im.ui.components.action-button.action-button :as action-button]
[status-im.ui.components.action-button.styles :as action-button.styles]
[status-im.ui.components.colors :as colors]
@ -21,13 +22,14 @@
:icon-opts {:color colors/blue}
:on-press #(re-frame/dispatch [:navigate-to :new-chat])}]
[action-button/action-separator]
;; TODO temporary removal before everything is fixed in group chats
[action-button/action-button
{:label (i18n/label :t/start-group-chat)
:accessibility-label :start-group-chat-button
:icon :icons/contacts
:icon-opts {:color colors/blue}
:on-press #(re-frame/dispatch [:open-contact-toggle-list :chat-group])}]
;; Hide behind flag (false by default), till everything is fixed in group chats
(when config/group-chats-enabled?
[action-button/action-button
{:label (i18n/label :t/start-group-chat)
:accessibility-label :start-group-chat-button
:icon :icons/contacts
:icon-opts {:color colors/blue}
:on-press #(re-frame/dispatch [:open-contact-toggle-list :chat-group])}])
[action-button/action-separator]
[action-button/action-button
{:label (i18n/label :t/new-public-group-chat)

View File

@ -41,3 +41,5 @@
(def pow-target (js/parseFloat (get-config :POW_TARGET "0.002")))
(def pow-time (js/parseInt (get-config :POW_TIME "1")))
(def group-chats-enabled? (enabled? (get-config :GROUP_CHATS_ENABLED)))