Skip to content

Commit

Permalink
Always enable notifications
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
borisyankov committed Nov 5, 2018
1 parent d6cd844 commit be20743
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
2 changes: 0 additions & 2 deletions src/config.js
Expand Up @@ -21,7 +21,6 @@ type Config = {
enableReduxSlowReducerWarnings: boolean,
enableSentry: boolean,
enableWebViewErrorDisplay: boolean,
enableNotifications: boolean,
slowReducersThreshold: number,
sentryKey: string,
enableErrorConsoleLogging: boolean,
Expand All @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/diagnostics/VariablesScreen.js
Expand Up @@ -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,
};
Expand Down
4 changes: 1 addition & 3 deletions src/message/fetchActions.js
Expand Up @@ -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);
};
Expand Down

0 comments on commit be20743

Please sign in to comment.