Define react-native-firebase relatives only for mobile platforms

Signed-off-by: Dmitry Novotochinov <dmitry.novot@gmail.com>
This commit is contained in:
Max Risuhin 2018-08-12 12:19:43 +03:00 committed by Dmitry Novotochinov
parent e2daa89af1
commit 85aad1d2a2
No known key found for this signature in database
GPG Key ID: 43D1DAF5AD39C927
5 changed files with 160 additions and 160 deletions

View File

@ -43,7 +43,6 @@
"react-native-image-crop-picker", "react-native-image-crop-picker",
"react-native-securerandom", "react-native-securerandom",
"react-native-webview-bridge", "react-native-webview-bridge",
"react-native-fcm",
"homoglyph-finder", "homoglyph-finder",
"web3", "web3",
"chance", "chance",

View File

@ -51,7 +51,6 @@
"react-native-config": "git+https://github.com/status-im/react-native-config.git", "react-native-config": "git+https://github.com/status-im/react-native-config.git",
"react-native-crypto": "2.1.1", "react-native-crypto": "2.1.1",
"react-native-dialogs": "0.0.20", "react-native-dialogs": "0.0.20",
"react-native-fcm": "10.0.3",
"react-native-fetch-polyfill": "1.1.2", "react-native-fetch-polyfill": "1.1.2",
"react-native-fs": "git+https://github.com/status-im/react-native-fs.git", "react-native-fs": "git+https://github.com/status-im/react-native-fs.git",
"react-native-http": "github:tradle/react-native-http#834492d", "react-native-http": "github:tradle/react-native-http#834492d",

View File

@ -12,7 +12,7 @@
(def EventEmmiter (js/require "react-native/Libraries/vendor/emitter/EventEmitter")) (def EventEmmiter (js/require "react-native/Libraries/vendor/emitter/EventEmitter"))
(def fetch (.-default (js/require "react-native-fetch-polyfill"))) (def fetch (.-default (js/require "react-native-fetch-polyfill")))
(def i18n (js/require "react-native-i18n")) (def i18n (js/require "react-native-i18n"))
(def react-native-firebase (js/require "react-native-firebase")) (def react-native-firebase #js {})
(def camera #js {:constants {:Aspect "Portrait"}}) (def camera #js {:constants {:Aspect "Portrait"}})
(def dialogs #js {}) (def dialogs #js {})
(def dismiss-keyboard #js {}) (def dismiss-keyboard #js {})

View File

@ -7,6 +7,7 @@
[status-im.utils.config :as config] [status-im.utils.config :as config]
[status-im.utils.keychain.core :as keychain] [status-im.utils.keychain.core :as keychain]
[status-im.utils.notifications :as notifications] [status-im.utils.notifications :as notifications]
[status-im.utils.platform :as platform]
[status-im.utils.universal-links.core :as universal-links])) [status-im.utils.universal-links.core :as universal-links]))
;;;; FX ;;;; FX
@ -133,4 +134,4 @@
(when (not= view-id :create-account) (when (not= view-id :create-account)
[[:navigate-to-clean :home] [[:navigate-to-clean :home]
(universal-links/stored-url-event cofx) (universal-links/stored-url-event cofx)
(notifications/stored-event address cofx)])]}) (when-not platform/desktop? (notifications/stored-event address cofx))])]})

View File

@ -4,7 +4,6 @@
[status-im.utils.handlers-macro :as handlers-macro] [status-im.utils.handlers-macro :as handlers-macro]
[status-im.utils.handlers :as handlers] [status-im.utils.handlers :as handlers]
[status-im.react-native.js-dependencies :as rn] [status-im.react-native.js-dependencies :as rn]
[status-im.utils.platform :as platform]
[status-im.ui.components.react :refer [copy-to-clipboard]] [status-im.ui.components.react :refer [copy-to-clipboard]]
[taoensso.timbre :as log] [taoensso.timbre :as log]
[status-im.utils.platform :as platform])) [status-im.utils.platform :as platform]))
@ -12,6 +11,8 @@
;; Work in progress namespace responsible for push notifications and interacting ;; Work in progress namespace responsible for push notifications and interacting
;; with Firebase Cloud Messaging. ;; with Firebase Cloud Messaging.
(when-not platform/desktop?
(handlers/register-handler-db (handlers/register-handler-db
:update-fcm-token :update-fcm-token
(fn [db [_ fcm-token]] (fn [db [_ fcm-token]]
@ -183,4 +184,4 @@
(on-notification) (on-notification)
(on-notification-opened) (on-notification-opened)
(when platform/android? (when platform/android?
(create-notification-channel))) (create-notification-channel))))