Merge pull request #5721 from status-im/fix/5571-fix-blank-screen-on-new-account
Always define request-permissions
This commit is contained in:
commit
c8e7267f3a
|
@ -37,7 +37,7 @@ ExternalProject_Add(StatusGo_ep
|
|||
PREFIX ${StatusGo_PREFIX}
|
||||
SOURCE_DIR ${StatusGo_SOURCE_DIR}
|
||||
GIT_REPOSITORY https://github.com/status-im/status-go.git
|
||||
GIT_TAG develop-g19b53030
|
||||
GIT_TAG v0.13.1
|
||||
BUILD_BYPRODUCTS ${StatusGo_STATIC_LIB}
|
||||
CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${CONFIGURE_SCRIPT} ${GO_ROOT_PATH} ${StatusGo_ROOT} ${StatusGo_SOURCE_DIR}
|
||||
BUILD_COMMAND ""
|
||||
|
|
|
@ -13,20 +13,22 @@
|
|||
|
||||
(when-not platform/desktop?
|
||||
|
||||
(def firebase (object/get rn/react-native-firebase "default"))
|
||||
(def firebase (object/get rn/react-native-firebase "default")))
|
||||
|
||||
;; NOTE: Only need to explicitly request permissions on iOS.
|
||||
(defn request-permissions []
|
||||
(if platform/desktop?
|
||||
(re-frame/dispatch [:notifications/request-notifications-granted {}])
|
||||
(-> (.requestPermission (.messaging firebase))
|
||||
(.then
|
||||
(fn [_]
|
||||
(log/debug "notifications-granted")
|
||||
(re-frame/dispatch [:notifications/request-notifications-granted {}]))
|
||||
(fn [_]
|
||||
(log/debug "notifications-denied")
|
||||
(re-frame/dispatch [:notifications/request-notifications-denied {}]))))))
|
||||
;; NOTE: Only need to explicitly request permissions on iOS.
|
||||
(defn request-permissions []
|
||||
(if platform/desktop?
|
||||
(re-frame/dispatch [:notifications/request-notifications-granted {}])
|
||||
(-> (.requestPermission (.messaging firebase))
|
||||
(.then
|
||||
(fn [_]
|
||||
(log/debug "notifications-granted")
|
||||
(re-frame/dispatch [:notifications/request-notifications-granted {}]))
|
||||
(fn [_]
|
||||
(log/debug "notifications-denied")
|
||||
(re-frame/dispatch [:notifications/request-notifications-denied {}]))))))
|
||||
|
||||
(when-not platform/desktop?
|
||||
|
||||
(defn get-fcm-token []
|
||||
(-> (.getToken (.messaging firebase))
|
||||
|
@ -158,3 +160,4 @@
|
|||
(handle-push-notification {:from from
|
||||
:to to}
|
||||
cofx)))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue