From be20743a72ca526cdd5e56b2c2de6cd6c5bdbdf0 Mon Sep 17 00:00:00 2001 From: Boris Yankov Date: Mon, 5 Nov 2018 13:07:36 -0800 Subject: [PATCH] Always enable notifications Previously we did disable notifications on emulators. That is not only not needed but also counter-productive as we want to be able to test them on different device configurations. Removes the config flag `enableNotifications` completely and the check that uses this flag to enable/not enable the notifications. --- src/config.js | 2 -- src/diagnostics/VariablesScreen.js | 1 - src/message/fetchActions.js | 4 +--- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/config.js b/src/config.js index fc47d1cadf3..e97d6832785 100644 --- a/src/config.js +++ b/src/config.js @@ -21,7 +21,6 @@ type Config = { enableReduxSlowReducerWarnings: boolean, enableSentry: boolean, enableWebViewErrorDisplay: boolean, - enableNotifications: boolean, slowReducersThreshold: number, sentryKey: string, enableErrorConsoleLogging: boolean, @@ -42,7 +41,6 @@ const config: Config = { enableReduxSlowReducerWarnings: isDevelopment && !!global.btoa, enableSentry: !isDevelopment && !isEmulator, enableWebViewErrorDisplay: isDevelopment, - enableNotifications: !isEmulator, slowReducersThreshold: 5, sentryKey: 'ADD-DSN-HERE', enableErrorConsoleLogging: true, diff --git a/src/diagnostics/VariablesScreen.js b/src/diagnostics/VariablesScreen.js index 8c43ad142bb..714c4373851 100644 --- a/src/diagnostics/VariablesScreen.js +++ b/src/diagnostics/VariablesScreen.js @@ -12,7 +12,6 @@ export default class VariablesScreen extends PureComponent<{}> { enableReduxLogging: config.enableReduxLogging, enableReduxSlowReducerWarnings: config.enableReduxSlowReducerWarnings, enableSentry: config.enableSentry, - enableNotifications: config.enableNotifications, 'process.env.NODE_ENV': process.env.NODE_ENV, 'global.btoa': !!global.btoa, }; diff --git a/src/message/fetchActions.js b/src/message/fetchActions.js index 9df5e777788..f82705f947e 100644 --- a/src/message/fetchActions.js +++ b/src/message/fetchActions.js @@ -201,9 +201,7 @@ export const doInitialFetch = () => async (dispatch: Dispatch, getState: GetStat dispatch(fetchEssentialInitialData()); dispatch(fetchRestOfInitialData()); - if (config.enableNotifications) { - dispatch(initNotifications()); - } + dispatch(initNotifications()); dispatch(sendFocusPing()); setInterval(() => sendFocusPing(), 60 * 1000); };