2017-11-14 16:18:15 +01:00
|
|
|
(ns status-im.core
|
2018-07-23 14:14:06 +02:00
|
|
|
(:require [re-frame.core :as re-frame]
|
|
|
|
[status-im.utils.error-handler :as error-handler]
|
2018-11-20 19:36:11 +01:00
|
|
|
[status-im.utils.platform :as platform]
|
2017-11-14 16:18:15 +01:00
|
|
|
[status-im.ui.components.react :as react]
|
2018-11-20 19:36:11 +01:00
|
|
|
[status-im.notifications.background :as background-messaging]
|
2017-11-14 16:18:15 +01:00
|
|
|
[reagent.core :as reagent]
|
2018-05-14 17:32:44 +02:00
|
|
|
status-im.transport.impl.receive
|
2018-07-19 17:51:06 +02:00
|
|
|
status-im.transport.impl.send
|
2017-11-14 16:18:15 +01:00
|
|
|
[taoensso.timbre :as log]
|
2017-12-21 17:33:51 +07:00
|
|
|
[status-im.utils.config :as config]
|
2018-03-23 17:17:53 +03:00
|
|
|
[status-im.react-native.js-dependencies :as js-dependencies]
|
2018-08-28 19:21:07 +03:00
|
|
|
[goog.object :as object]
|
|
|
|
cljs.core.specs.alpha))
|
2017-12-21 17:33:51 +07:00
|
|
|
|
|
|
|
(when js/goog.DEBUG
|
2018-09-06 12:01:54 +02:00
|
|
|
(.ignoreWarnings (.-YellowBox js-dependencies/react-native) #js ["re-frame: overwriting"]))
|
2017-11-14 16:18:15 +01:00
|
|
|
|
|
|
|
(defn init [app-root]
|
|
|
|
(log/set-level! config/log-level)
|
|
|
|
(error-handler/register-exception-handler!)
|
2018-09-06 12:04:12 +02:00
|
|
|
(re-frame/dispatch [:init/app-started])
|
2018-11-20 19:36:11 +01:00
|
|
|
(.registerComponent react/app-registry "StatusIm" #(reagent/reactify-component app-root))
|
|
|
|
(when platform/android?
|
|
|
|
(.registerHeadlessTask react/app-registry "RNFirebaseBackgroundMessage" background-messaging/message-handler-fn)))
|