[ISSUE #3331] Allow to configure view compilation

Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
This commit is contained in:
Julien Eluard 2018-02-28 09:28:28 +01:00
parent c1900a24ec
commit a86e59dbbe
No known key found for this signature in database
GPG Key ID: 6FD7DB5437FCBEF6
5 changed files with 7 additions and 3 deletions

2
.env
View File

@ -10,4 +10,4 @@ JSC_ENABLED=1
QUEUE_MESSAGE_ENABLED=1
MANY_WHISPER_TOPICS_ENABLED=0
RN_BRIDGE_THRESHOLD_WARNINGS=0
COMPILE_VIEWS_ENABLED=0

View File

@ -10,3 +10,4 @@ JSC_ENABLED=1
QUEUE_MESSAGE_ENABLED=1
MANY_WHISPER_TOPICS_ENABLED=0
RN_BRIDGE_THRESHOLD_WARNINGS=0
COMPILE_VIEWS_ENABLED=0

View File

@ -10,3 +10,4 @@ JSC_ENABLED=0
QUEUE_MESSAGE_ENABLED=0
MANY_WHISPER_TOPICS_ENABLED=0
RN_BRIDGE_THRESHOLD_WARNINGS=0
COMPILE_VIEWS_ENABLED=0

View File

@ -50,7 +50,8 @@
[status-im.ui.screens.network-settings.network-details.views :refer [network-details]]
[status-im.ui.screens.network-settings.parse-json.views :refer [paste-json-text]]
[status-im.ui.screens.browser.views :refer [browser]]
[status-im.ui.screens.add-new.open-dapp.views :refer [open-dapp dapp-description]]))
[status-im.ui.screens.add-new.open-dapp.views :refer [open-dapp dapp-description]]
[status-im.utils.config :as config]))
(defn validate-current-view
[current-view signed-up?]
@ -175,7 +176,7 @@
(throw (str "Unknown view: " current-view)))
main-screen-view (create-main-screen-view current-view)]
[main-screen-view common-styles/flex
(if (and android?
(if (and config/compile-views-enabled?
signed-up?
(#{:home :wallet :my-profile :chat :wallet-send-transaction
:choose-recipient :wallet-transaction-sent :transactions-history

View File

@ -32,3 +32,4 @@
(def queue-message-enabled? (enabled? (get-config :QUEUE_MESSAGE_ENABLED 0)))
(def many-whisper-topics-enabled? (enabled? (get-config :MANY_WHISPER_TOPICS_ENABLED 0)))
(def rn-bridge-threshold-warnings-enabled? (enabled? (get-config :RN_BRIDGE_THRESHOLD_WARNINGS 0)))
(def compile-views-enabled? (enabled? (get-config :COMPILE_VIEWS_ENABLED 0)))