move jail initialization to core/init

This commit is contained in:
Adrian Tiberius 2016-12-08 11:55:21 +02:00
parent ac617b73d5
commit a96203b982
3 changed files with 4 additions and 3 deletions

View File

@ -123,6 +123,7 @@
[component])]])]))))}))) [component])]])]))))})))
(defn init [& [env]] (defn init [& [env]]
(status/call-module status/init-jail)
(dispatch-sync [:reset-app]) (dispatch-sync [:reset-app])
(.registerComponent app-registry "StatusIm" #(r/reactify-component app-root)) (.registerComponent app-registry "StatusIm" #(r/reactify-component app-root))
(dispatch [:listen-to-network-status!]) (dispatch [:listen-to-network-status!])

View File

@ -51,8 +51,6 @@
(let [init-js (str js-res/status-js "I18n.locale = '" i/i18n.locale "';")] (let [init-js (str js-res/status-js "I18n.locale = '" i/i18n.locale "';")]
(.initJail status init-js #(log/debug "jail initialized")))) (.initJail status init-js #(log/debug "jail initialized"))))
(when status (call-module init-jail))
(defonce listener-initialized (atom false)) (defonce listener-initialized (atom false))
(when-not @listener-initialized (when-not @listener-initialized

View File

@ -29,7 +29,8 @@
status-im.data-store.core status-im.data-store.core
[taoensso.timbre :as log] [taoensso.timbre :as log]
[status-im.chat.styles.screen :as st] [status-im.chat.styles.screen :as st]
[status-im.accounts.views.qr-code :refer [qr-code-view]])) [status-im.accounts.views.qr-code :refer [qr-code-view]]
[status-im.components.status :as status]))
(defn orientation->keyword [o] (defn orientation->keyword [o]
(keyword (.toLowerCase o))) (keyword (.toLowerCase o)))
@ -109,6 +110,7 @@
[component])]])]))))}))) [component])]])]))))})))
(defn init [] (defn init []
(status/call-module status/init-jail)
(dispatch-sync [:reset-app]) (dispatch-sync [:reset-app])
(dispatch [:listen-to-network-status!]) (dispatch [:listen-to-network-status!])
(dispatch [:initialize-crypt]) (dispatch [:initialize-crypt])