update
This commit is contained in:
parent
3356aa55ae
commit
ac094a0e09
|
@ -41,7 +41,7 @@ import debounce from './utils/debounce';
|
||||||
|
|
||||||
RNScreens.enableScreens();
|
RNScreens.enableScreens();
|
||||||
|
|
||||||
const configValue = RNConfigReader.PLAY_BUILD;
|
const isPlayBuild = RNConfigReader.PLAY_BUILD;
|
||||||
|
|
||||||
const parseDeepLinking = (url) => {
|
const parseDeepLinking = (url) => {
|
||||||
if (url) {
|
if (url) {
|
||||||
|
@ -163,7 +163,7 @@ export default class Root extends React.Component {
|
||||||
if (!allowCrashReport) {
|
if (!allowCrashReport) {
|
||||||
loggerConfig.autoNotify = false;
|
loggerConfig.autoNotify = false;
|
||||||
loggerConfig.registerBeforeSendCallback(() => false);
|
loggerConfig.registerBeforeSendCallback(() => false);
|
||||||
if (configValue) {
|
if (isPlayBuild) {
|
||||||
analytics().setAnalyticsCollectionEnabled(false);
|
analytics().setAnalyticsCollectionEnabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,8 +37,8 @@ export const onNotification = (notification) => {
|
||||||
export const getDeviceToken = () => PushNotification.getDeviceToken();
|
export const getDeviceToken = () => PushNotification.getDeviceToken();
|
||||||
export const setBadgeCount = count => PushNotification.setBadgeCount(count);
|
export const setBadgeCount = count => PushNotification.setBadgeCount(count);
|
||||||
export const initializePushNotifications = () => {
|
export const initializePushNotifications = () => {
|
||||||
const configValue = RNConfigReader.PLAY_BUILD;
|
const isPlayBuild = RNConfigReader.PLAY_BUILD;
|
||||||
if (configValue) {
|
if (isPlayBuild) {
|
||||||
setBadgeCount();
|
setBadgeCount();
|
||||||
return PushNotification.configure({
|
return PushNotification.configure({
|
||||||
onNotification
|
onNotification
|
||||||
|
|
|
@ -3,7 +3,7 @@ import firebase from 'react-native-firebase';
|
||||||
import RNConfigReader from 'react-native-config-reader';
|
import RNConfigReader from 'react-native-config-reader';
|
||||||
import config from '../../config';
|
import config from '../../config';
|
||||||
|
|
||||||
const configValue = RNConfigReader.PLAY_BUILD;
|
const isPlayBuild = RNConfigReader.PLAY_BUILD;
|
||||||
const bugsnag = new Client(config.BUGSNAG_API_KEY);
|
const bugsnag = new Client(config.BUGSNAG_API_KEY);
|
||||||
|
|
||||||
export const { analytics } = firebase != null;
|
export const { analytics } = firebase != null;
|
||||||
|
@ -19,7 +19,7 @@ export const logServerVersion = (serverVersion) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const setCurrentScreen = (currentScreen) => {
|
export const setCurrentScreen = (currentScreen) => {
|
||||||
if (configValue) {
|
if (isPlayBuild) {
|
||||||
analytics().setCurrentScreen(currentScreen);
|
analytics().setCurrentScreen(currentScreen);
|
||||||
}
|
}
|
||||||
leaveBreadcrumb(currentScreen, { type: 'navigation' });
|
leaveBreadcrumb(currentScreen, { type: 'navigation' });
|
||||||
|
|
|
@ -37,7 +37,7 @@ import { onReviewPress } from '../../utils/review';
|
||||||
import { getUserSelector } from '../../selectors/login';
|
import { getUserSelector } from '../../selectors/login';
|
||||||
import SafeAreaView from '../../containers/SafeAreaView';
|
import SafeAreaView from '../../containers/SafeAreaView';
|
||||||
|
|
||||||
const configValue = RNConfigReader.PLAY_BUILD;
|
const isPlayBuild = RNConfigReader.PLAY_BUILD;
|
||||||
|
|
||||||
const SectionSeparator = React.memo(({ theme }) => (
|
const SectionSeparator = React.memo(({ theme }) => (
|
||||||
<View
|
<View
|
||||||
|
@ -118,7 +118,7 @@ class SettingsView extends React.Component {
|
||||||
const { toggleCrashReport } = this.props;
|
const { toggleCrashReport } = this.props;
|
||||||
toggleCrashReport(value);
|
toggleCrashReport(value);
|
||||||
loggerConfig.autoNotify = value;
|
loggerConfig.autoNotify = value;
|
||||||
if (configValue) {
|
if (isPlayBuild) {
|
||||||
analytics().setAnalyticsCollectionEnabled(value);
|
analytics().setAnalyticsCollectionEnabled(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue