mirror of
https://github.com/status-im/status-react.git
synced 2025-02-23 08:08:33 +00:00
Removed NOTIFICATIONS_WIP_ENABLED flag
fixes #2813 status: ready Signed-off-by: Oskar Thoren <ot@oskarthoren.com>
This commit is contained in:
parent
5a58211703
commit
db293e7ad5
1
.env
1
.env
@ -1,5 +1,4 @@
|
|||||||
TESTFAIRY_ENABLED=0
|
TESTFAIRY_ENABLED=0
|
||||||
NOTIFICATIONS_WIP_ENABLED=1
|
|
||||||
STUB_STATUS_GO=0
|
STUB_STATUS_GO=0
|
||||||
ETHEREUM_DEV_CLUSTER=1
|
ETHEREUM_DEV_CLUSTER=1
|
||||||
MAINNET_NETWORKS_ENABLED=1
|
MAINNET_NETWORKS_ENABLED=1
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
TESTFAIRY_ENABLED=1
|
TESTFAIRY_ENABLED=1
|
||||||
NOTIFICATIONS_WIP_ENABLED=1
|
|
||||||
STUB_STATUS_GO=0
|
STUB_STATUS_GO=0
|
||||||
ETHEREUM_DEV_CLUSTER=1
|
ETHEREUM_DEV_CLUSTER=1
|
||||||
MAINNET_NETWORKS_ENABLED=1
|
MAINNET_NETWORKS_ENABLED=1
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
TESTFAIRY_ENABLED=0
|
TESTFAIRY_ENABLED=0
|
||||||
NOTIFICATIONS_WIP_ENABLED=1
|
|
||||||
STUB_STATUS_GO=0
|
STUB_STATUS_GO=0
|
||||||
ETHEREUM_DEV_CLUSTER=0
|
ETHEREUM_DEV_CLUSTER=0
|
||||||
MAINNET_NETWORKS_ENABLED=0
|
MAINNET_NETWORKS_ENABLED=0
|
||||||
|
@ -38,7 +38,6 @@ node ('macos1') {
|
|||||||
// TODO(oskarth): Consider read/write from .env to avoid having to specify in Jenkins again
|
// TODO(oskarth): Consider read/write from .env to avoid having to specify in Jenkins again
|
||||||
// sh 'cp .env.jenkins .env'
|
// sh 'cp .env.jenkins .env'
|
||||||
sh 'echo TESTFAIRY_ENABLED=' + TESTFAIRY_ENABLED + '>>' + '.env'
|
sh 'echo TESTFAIRY_ENABLED=' + TESTFAIRY_ENABLED + '>>' + '.env'
|
||||||
sh 'echo NOTIFICATIONS_WIP_ENABLED=' + NOTIFICATIONS_WIP_ENABLED + '>>' + '.env'
|
|
||||||
sh 'echo STUB_STATUS_GO=' + STUB_STATUS_GO + '>>' + '.env'
|
sh 'echo STUB_STATUS_GO=' + STUB_STATUS_GO + '>>' + '.env'
|
||||||
sh 'echo ETHEREUM_DEV_CLUSTER=' + ETHEREUM_DEV_CLUSTER + '>>' + '.env'
|
sh 'echo ETHEREUM_DEV_CLUSTER=' + ETHEREUM_DEV_CLUSTER + '>>' + '.env'
|
||||||
sh 'echo MAINNET_NETWORKS_ENABLED=' + MAINNET_NETWORKS_ENABLED + '>>' + '.env'
|
sh 'echo MAINNET_NETWORKS_ENABLED=' + MAINNET_NETWORKS_ENABLED + '>>' + '.env'
|
||||||
|
@ -68,10 +68,9 @@
|
|||||||
(.addEventListener react/app-state "change" app-state-change-handler))
|
(.addEventListener react/app-state "change" app-state-change-handler))
|
||||||
:component-did-mount
|
:component-did-mount
|
||||||
(fn []
|
(fn []
|
||||||
(when config/notifications-wip-enabled?
|
|
||||||
(notifications/on-refresh-fcm-token)
|
(notifications/on-refresh-fcm-token)
|
||||||
;; TODO(oskarth): Background click_action handler
|
;; TODO(oskarth): Background click_action handler
|
||||||
(notifications/on-notification)))
|
(notifications/on-notification))
|
||||||
:component-will-unmount
|
:component-will-unmount
|
||||||
(fn []
|
(fn []
|
||||||
(.stop react/http-bridge)
|
(.stop react/http-bridge)
|
||||||
|
@ -68,8 +68,7 @@
|
|||||||
:user-message (cond-> {::send-message
|
:user-message (cond-> {::send-message
|
||||||
(assoc-in message-to-send
|
(assoc-in message-to-send
|
||||||
[:message :to] to)}
|
[:message :to] to)}
|
||||||
(and fcm-token config/notifications-wip-enabled?)
|
fcm-token (assoc ::send-notification fcm-token))))))))
|
||||||
(assoc ::send-notification fcm-token))))))))
|
|
||||||
|
|
||||||
(defn prepare-message
|
(defn prepare-message
|
||||||
[{:keys [db now random-id get-last-clock-value] :as cofx}
|
[{:keys [db now random-id get-last-clock-value] :as cofx}
|
||||||
|
@ -43,10 +43,9 @@
|
|||||||
(.hide react/splash-screen))
|
(.hide react/splash-screen))
|
||||||
:component-did-mount
|
:component-did-mount
|
||||||
(fn []
|
(fn []
|
||||||
(when config/notifications-wip-enabled?
|
|
||||||
(notifications/request-permissions)
|
(notifications/request-permissions)
|
||||||
(notifications/on-refresh-fcm-token)
|
(notifications/on-refresh-fcm-token)
|
||||||
(notifications/on-notification)))
|
(notifications/on-notification))
|
||||||
:component-will-unmount
|
:component-will-unmount
|
||||||
(fn []
|
(fn []
|
||||||
(.stop react/http-bridge))
|
(.stop react/http-bridge))
|
||||||
|
@ -16,12 +16,10 @@
|
|||||||
;;
|
;;
|
||||||
;; TESTFAIRY_ENABLED - indefinite
|
;; TESTFAIRY_ENABLED - indefinite
|
||||||
;; STUB_STATUS_GO - indefinite
|
;; STUB_STATUS_GO - indefinite
|
||||||
;; NOTIFICATIONS_WIP_ENABLED - in 0.9.12 release, remove in develop if all goes well
|
|
||||||
;; ERC20_ENABLED - until idea #3 is merged, remove in develop when ready
|
;; ERC20_ENABLED - until idea #3 is merged, remove in develop when ready
|
||||||
;; OFFLINE_INBOX_ENABLED - TBD, tenatively until #idea 1 is merged
|
;; OFFLINE_INBOX_ENABLED - TBD, tenatively until #idea 1 is merged
|
||||||
|
|
||||||
(def testfairy-enabled? (enabled? (get-config :TESTFAIRY_ENABLED)))
|
(def testfairy-enabled? (enabled? (get-config :TESTFAIRY_ENABLED)))
|
||||||
(def notifications-wip-enabled? (enabled? (get-config :NOTIFICATIONS_WIP_ENABLED 0)))
|
|
||||||
(def stub-status-go? (enabled? (get-config :STUB_STATUS_GO 0)))
|
(def stub-status-go? (enabled? (get-config :STUB_STATUS_GO 0)))
|
||||||
(def mainnet-networks-enabled? (enabled? (get-config :MAINNET_NETWORKS_ENABLED 0)))
|
(def mainnet-networks-enabled? (enabled? (get-config :MAINNET_NETWORKS_ENABLED 0)))
|
||||||
(def erc20-enabled? (enabled? (get-config :ERC20_ENABLED 0)))
|
(def erc20-enabled? (enabled? (get-config :ERC20_ENABLED 0)))
|
||||||
|
@ -22,9 +22,8 @@
|
|||||||
(defn get-fcm-token []
|
(defn get-fcm-token []
|
||||||
(-> (.getFCMToken (aget rn/react-native-fcm "default"))
|
(-> (.getFCMToken (aget rn/react-native-fcm "default"))
|
||||||
(.then (fn [x]
|
(.then (fn [x]
|
||||||
(when config/notifications-wip-enabled?
|
|
||||||
(log/debug "get-fcm-token: " x)
|
(log/debug "get-fcm-token: " x)
|
||||||
(dispatch [:update-fcm-token x]))))))
|
(dispatch [:update-fcm-token x])))))
|
||||||
|
|
||||||
(defn on-refresh-fcm-token []
|
(defn on-refresh-fcm-token []
|
||||||
(.on (.-default rn/react-native-fcm)
|
(.on (.-default rn/react-native-fcm)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user