From 14cada8373456d21e07077339306611b0b6c57ca Mon Sep 17 00:00:00 2001 From: Vitaliy Vlasov Date: Fri, 31 Aug 2018 14:23:23 +0300 Subject: [PATCH 1/2] Always define request-permissions Remove empty line Another empty line --- src/status_im/notifications/core.cljs | 29 +++++++++++++++------------ 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/status_im/notifications/core.cljs b/src/status_im/notifications/core.cljs index ed500b3c71..19b0eae8c3 100644 --- a/src/status_im/notifications/core.cljs +++ b/src/status_im/notifications/core.cljs @@ -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))))) + From 5f107c17feb524a8bb4f97c6f9c1358f9aa011b3 Mon Sep 17 00:00:00 2001 From: Vitaliy Vlasov Date: Fri, 31 Aug 2018 19:00:02 +0300 Subject: [PATCH 2/2] Use updated Status-Go --- modules/react-native-status/desktop/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/react-native-status/desktop/CMakeLists.txt b/modules/react-native-status/desktop/CMakeLists.txt index 2ca7b918e5..00de7c2045 100755 --- a/modules/react-native-status/desktop/CMakeLists.txt +++ b/modules/react-native-status/desktop/CMakeLists.txt @@ -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 ""