shakebug-react-native 2.2.6 → 2.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>URL</key>
6
+ <string>file:///Volumes/Data/React-Native/expenzo/node_modules/shakebug-react-native/src</string>
7
+ </dict>
8
+ </plist>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shakebug-react-native",
3
3
  "title": "shakebug-react-native",
4
- "version": "2.2.6",
4
+ "version": "2.2.8",
5
5
  "description": "Shakebug allows users to report the bug from your mobile phone for your application. Here users just need to shake their mobile and all the data regarding bugs & crashes can be seen by developers through their log in panel easily",
6
6
  "main": "src/index.tsx",
7
7
  "scripts": {
@@ -1,4 +1,4 @@
1
- import { View, Text, TouchableOpacity, Image, TextInput, PanResponder, Alert, StyleSheet, Keyboard, LogBox, Platform, StatusBar, NativeModules, BackHandler, DeviceEventEmitter, Dimensions } from 'react-native'
1
+ import { View, Text, TouchableOpacity, Image, TextInput, PanResponder, Alert, StyleSheet, Keyboard, LogBox, Platform, StatusBar, NativeModules, BackHandler, DeviceEventEmitter, Dimensions, SafeAreaView } from 'react-native'
2
2
  import React, { useState, useRef, useEffect } from 'react'
3
3
  import { launchImageLibrary } from '../../ImageOrVedioPicker/src/index';
4
4
  import { AddIssueApi } from '../APIs/AddIssue';
@@ -13,8 +13,7 @@ import KeyboardAvoidingWrapper from '../Componanats/KeyboardAvoidingWrapper';
13
13
  import { useGlobalState } from 'shakebug-react-native/src/Componanats/GlobalStateContext';
14
14
  import CustomeAlert from 'shakebug-react-native/src/Componanats/CustomAlert';
15
15
  import NetInfo from 'shakebug-react-native/NetInfo/src';
16
- import { SafeAreaView } from 'react-native-safe-area-context';
17
-
16
+ import DeviceInfo from '../../DeviceInfo';
18
17
 
19
18
  console.ignoredYellowBox = ["Warning: Each", "Warning: Failed", "Non-serializable"];
20
19
 
@@ -26,8 +25,6 @@ const { CreateThumbnail } = NativeModules;
26
25
 
27
26
  const AddDetailsScreen = ({ media, updateParent, mediaType, themeColor, SDKScreenTitle }) => {
28
27
 
29
- const insets = useSafeAreaInsets();
30
-
31
28
  const { setIsScreenShot, setIsRecordingStart } = useGlobalState()
32
29
 
33
30
  const { goBack, navigate, goToScreenAtIndex } = useNavigation();
@@ -288,7 +285,7 @@ const AddDetailsScreen = ({ media, updateParent, mediaType, themeColor, SDKScree
288
285
  }
289
286
 
290
287
  return (
291
- <SafeAreaView style={{ width: "100%", height: "100%", backgroundColor: themeColor}}>
288
+ <SafeAreaView style={{ width: "100%", height: "100%", backgroundColor: themeColor, paddingTop: Platform.OS == 'android' ? DeviceInfo?.getSystemVersion() > 14 && StatusBar.currentHeight : 0 , paddingBottom: Platform.OS == 'android' ? DeviceInfo?.getSystemVersion() > 14 && StatusBar.currentHeight : 0}}>
292
289
  <StatusBar backgroundColor={ThemeColor} hidden={false} />
293
290
  <KeyboardAvoidingWrapper>
294
291
  <>
@@ -470,7 +467,7 @@ const AddDetailsScreen = ({ media, updateParent, mediaType, themeColor, SDKScree
470
467
  }}
471
468
  />
472
469
 
473
- </SafeAreaView >
470
+ </SafeAreaView>
474
471
  )
475
472
  }
476
473
 
@@ -309,7 +309,7 @@ const FirstScreen = ({ img, themeColor, SDKScreenTitle }) => {
309
309
  // backgroundColor: "#181818"
310
310
 
311
311
  return (
312
- <View style={{ width: "100%", height: '100%', backgroundColor: themeColor, paddingTop: Platform.OS == 'android' ? DeviceInfo?.getSystemVersion() > 14 ? StatusBar.currentHeight : 0 : StatusBar.currentHeight, paddingBottom: Platform.OS == 'android' ? DeviceInfo?.getSystemVersion() > 14 ? StatusBar.currentHeight : 0 : StatusBar.currentHeight}}>
312
+ <SafeAreaView style={{ width: "100%", height: '100%', backgroundColor: themeColor, paddingTop: Platform.OS == 'android' ? DeviceInfo?.getSystemVersion() > 14 && StatusBar.currentHeight : 0 , paddingBottom: Platform.OS == 'android' ? DeviceInfo?.getSystemVersion() > 14 && StatusBar.currentHeight : 0}}>
313
313
  <StatusBar backgroundColor={ThemeColor} />
314
314
 
315
315
  <View style={{ width: "100%", height: "100%", backgroundColor: "#e4fdfd" }}>
@@ -354,7 +354,7 @@ const FirstScreen = ({ img, themeColor, SDKScreenTitle }) => {
354
354
  </TouchableOpacity>
355
355
  </View>
356
356
  <View style={{ position: 'relative', height: Platform.OS == 'android' ? '78%' : '79%', backgroundColor: '#e4fdfd', width: '100%', alignItems: 'center', paddingTop: 8 }}>
357
- <ViewShot ref={ref} options={{ fileName: "ScreenShort", format: "jpg", quality: 1 }} style={{ width: Platform.OS == 'android' ? "77%" : '73%', height: '100%' }}>
357
+ <ViewShot ref={ref} options={{ fileName: "ScreenShort", format: "png", quality: 1 }} collapsable={false} style={{ width: Platform.OS == 'android' ? "77%" : '73%', height: '100%' }}>
358
358
 
359
359
  {text.trim().length > 0 ?
360
360
  <Animated.View
@@ -400,7 +400,7 @@ const FirstScreen = ({ img, themeColor, SDKScreenTitle }) => {
400
400
  </Animated.View>
401
401
  : null}
402
402
  <ImageBackground
403
- source={{ uri: image }}
403
+ source={image ? { uri: image } : undefined}
404
404
  style={{
405
405
  alignItems: 'center',
406
406
  width: "100%",
@@ -569,7 +569,7 @@ const FirstScreen = ({ img, themeColor, SDKScreenTitle }) => {
569
569
 
570
570
  {isLoading && <ActivityIndicator size={'large'} color={themeColor} collapsable={true} style={{ position: 'absolute', top: 0, bottom: 0, left: 0, right: 0, elevation: 2 }} />}
571
571
 
572
- </View>
572
+ </SafeAreaView>
573
573
  )
574
574
  }
575
575
 
@@ -52,7 +52,7 @@ global.isScreeenShotTaken = false;
52
52
  global.restrictedViews = [];
53
53
  global.currentScreen = ""
54
54
  global.isShakebugSDKOpen = false;
55
- global.sdk_version = "2.2.6";
55
+ global.sdk_version = "2.2.8";
56
56
  global.app_lunch_count = 0;
57
57
  global.POPUP_LAUNCH_THRESHOLD = 3;
58
58
  global.POPUP_COOLDOWN_DAYS = 2;
@@ -134,23 +134,23 @@ function Shakebug({ children, Android_appkey, iOS_appkey, showTutorialScreenFirs
134
134
 
135
135
  if (SDK_VERSION) {
136
136
  if (SDK_VERSION != global.sdk_version) {
137
- ShakebugSDKSharedPreferencesModule.setString("KEY_APP_LAUNCH_COUNT", 0)
138
- ShakebugSDKSharedPreferencesModule.setString("LAST_POPUP_TIME", null)
137
+ ShakebugSDKSharedPreferencesModule.setString("KEY_APP_LAUNCH_COUNT", "0")
138
+ ShakebugSDKSharedPreferencesModule.setString("LAST_POPUP_TIME", "")
139
139
  ShakebugSDKSharedPreferencesModule.setString("IS_REVIEW_SUBMITTED", "false")
140
140
  ShakebugSDKSharedPreferencesModule.setString("SDK_VERSION", global.sdk_version)
141
141
  }
142
142
  }
143
143
  else {
144
- ShakebugSDKSharedPreferencesModule.setString("KEY_APP_LAUNCH_COUNT", 0)
145
- ShakebugSDKSharedPreferencesModule.setString("LAST_POPUP_TIME", null)
144
+ ShakebugSDKSharedPreferencesModule.setString("KEY_APP_LAUNCH_COUNT", "0")
145
+ ShakebugSDKSharedPreferencesModule.setString("LAST_POPUP_TIME", "")
146
146
  ShakebugSDKSharedPreferencesModule.setString("IS_REVIEW_SUBMITTED", "false")
147
147
  ShakebugSDKSharedPreferencesModule.setString("SDK_VERSION", global.sdk_version)
148
148
  }
149
149
 
150
- global.app_lunch_count = (KEY_APP_LAUNCH_COUNT + 1);
150
+ global.app_lunch_count = (parseInt(KEY_APP_LAUNCH_COUNT) + 1);
151
151
 
152
152
  if (global.app_lunch_count >= POPUP_LAUNCH_THRESHOLD) {
153
- if (LAST_POPUP_TIME && IS_REVIEW_SUBMITTED != "true") {
153
+ if (LAST_POPUP_TIME && LAST_POPUP_TIME != "" && IS_REVIEW_SUBMITTED != "true") {
154
154
  const now = Date.now(); // current timestamp in milliseconds
155
155
  const sevenDaysInMs = global.POPUP_COOLDOWN_DAYS * 24 * 60 * 60 * 1000; // 7 days in milliseconds
156
156