This commit is contained in:
GOVINDDIXIT 2020-07-13 18:41:55 +05:30
parent 3356aa55ae
commit ac094a0e09
4 changed files with 8 additions and 8 deletions

View File

@ -41,7 +41,7 @@ import debounce from './utils/debounce';
RNScreens.enableScreens();
const configValue = RNConfigReader.PLAY_BUILD;
const isPlayBuild = RNConfigReader.PLAY_BUILD;
const parseDeepLinking = (url) => {
if (url) {
@ -163,7 +163,7 @@ export default class Root extends React.Component {
if (!allowCrashReport) {
loggerConfig.autoNotify = false;
loggerConfig.registerBeforeSendCallback(() => false);
if (configValue) {
if (isPlayBuild) {
analytics().setAnalyticsCollectionEnabled(false);
}
}

View File

@ -37,8 +37,8 @@ export const onNotification = (notification) => {
export const getDeviceToken = () => PushNotification.getDeviceToken();
export const setBadgeCount = count => PushNotification.setBadgeCount(count);
export const initializePushNotifications = () => {
const configValue = RNConfigReader.PLAY_BUILD;
if (configValue) {
const isPlayBuild = RNConfigReader.PLAY_BUILD;
if (isPlayBuild) {
setBadgeCount();
return PushNotification.configure({
onNotification

View File

@ -3,7 +3,7 @@ import firebase from 'react-native-firebase';
import RNConfigReader from 'react-native-config-reader';
import config from '../../config';
const configValue = RNConfigReader.PLAY_BUILD;
const isPlayBuild = RNConfigReader.PLAY_BUILD;
const bugsnag = new Client(config.BUGSNAG_API_KEY);
export const { analytics } = firebase != null;
@ -19,7 +19,7 @@ export const logServerVersion = (serverVersion) => {
};
export const setCurrentScreen = (currentScreen) => {
if (configValue) {
if (isPlayBuild) {
analytics().setCurrentScreen(currentScreen);
}
leaveBreadcrumb(currentScreen, { type: 'navigation' });

View File

@ -37,7 +37,7 @@ import { onReviewPress } from '../../utils/review';
import { getUserSelector } from '../../selectors/login';
import SafeAreaView from '../../containers/SafeAreaView';
const configValue = RNConfigReader.PLAY_BUILD;
const isPlayBuild = RNConfigReader.PLAY_BUILD;
const SectionSeparator = React.memo(({ theme }) => (
<View
@ -118,7 +118,7 @@ class SettingsView extends React.Component {
const { toggleCrashReport } = this.props;
toggleCrashReport(value);
loggerConfig.autoNotify = value;
if (configValue) {
if (isPlayBuild) {
analytics().setAnalyticsCollectionEnabled(value);
}