shakebug-react-native 2.2.1 → 2.2.2
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.
- package/package.json +1 -1
- package/src/Screens/Shakebug.js +6 -6
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.
|
|
4
|
+
"version": "2.2.2",
|
|
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": {
|
package/src/Screens/Shakebug.js
CHANGED
|
@@ -51,7 +51,7 @@ global.isScreeenShotTaken = false;
|
|
|
51
51
|
global.restrictedViews = [];
|
|
52
52
|
global.currentScreen = ""
|
|
53
53
|
global.isShakebugSDKOpen = false;
|
|
54
|
-
global.sdk_version = "2.2.
|
|
54
|
+
global.sdk_version = "2.2.2";
|
|
55
55
|
global.app_lunch_count = 0;
|
|
56
56
|
global.POPUP_LAUNCH_THRESHOLD = 3;
|
|
57
57
|
global.POPUP_COOLDOWN_DAYS = 2;
|
|
@@ -133,15 +133,15 @@ function Shakebug({ children, Android_appkey, iOS_appkey, showTutorialScreenFirs
|
|
|
133
133
|
|
|
134
134
|
if (SDK_VERSION) {
|
|
135
135
|
if (SDK_VERSION != global.sdk_version) {
|
|
136
|
-
ShakebugSDKSharedPreferencesModule.setString("KEY_APP_LAUNCH_COUNT", 0)
|
|
137
|
-
ShakebugSDKSharedPreferencesModule.setString("LAST_POPUP_TIME", null)
|
|
136
|
+
ShakebugSDKSharedPreferencesModule.setString("KEY_APP_LAUNCH_COUNT", "0")
|
|
137
|
+
ShakebugSDKSharedPreferencesModule.setString("LAST_POPUP_TIME", "null")
|
|
138
138
|
ShakebugSDKSharedPreferencesModule.setString("IS_REVIEW_SUBMITTED", "false")
|
|
139
139
|
ShakebugSDKSharedPreferencesModule.setString("SDK_VERSION", global.sdk_version)
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
else {
|
|
143
|
-
ShakebugSDKSharedPreferencesModule.setString("KEY_APP_LAUNCH_COUNT", 0)
|
|
144
|
-
ShakebugSDKSharedPreferencesModule.setString("LAST_POPUP_TIME", null)
|
|
143
|
+
ShakebugSDKSharedPreferencesModule.setString("KEY_APP_LAUNCH_COUNT", "0")
|
|
144
|
+
ShakebugSDKSharedPreferencesModule.setString("LAST_POPUP_TIME", "null")
|
|
145
145
|
ShakebugSDKSharedPreferencesModule.setString("IS_REVIEW_SUBMITTED", "false")
|
|
146
146
|
ShakebugSDKSharedPreferencesModule.setString("SDK_VERSION", global.sdk_version)
|
|
147
147
|
}
|
|
@@ -149,7 +149,7 @@ function Shakebug({ children, Android_appkey, iOS_appkey, showTutorialScreenFirs
|
|
|
149
149
|
global.app_lunch_count = (KEY_APP_LAUNCH_COUNT + 1);
|
|
150
150
|
|
|
151
151
|
if (global.app_lunch_count >= POPUP_LAUNCH_THRESHOLD) {
|
|
152
|
-
if (LAST_POPUP_TIME && IS_REVIEW_SUBMITTED != "true") {
|
|
152
|
+
if (LAST_POPUP_TIME != "null" && LAST_POPUP_TIME != null && IS_REVIEW_SUBMITTED != "true") {
|
|
153
153
|
const now = Date.now(); // current timestamp in milliseconds
|
|
154
154
|
const sevenDaysInMs = global.POPUP_COOLDOWN_DAYS * 24 * 60 * 60 * 1000; // 7 days in milliseconds
|
|
155
155
|
|