reactnative-plugin-appice 1.7.7 → 1.7.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.
@@ -181,10 +181,10 @@ public class AppICEUtils {
181
181
  props.put(key, propsMap.getBoolean(key));
182
182
  } else if (readableType == ReadableType.Number) {
183
183
  try {
184
- props.put(key, propsMap.getDouble(key));
184
+ props.put(key, propsMap.getInt(key));
185
185
  } catch (Throwable t) {
186
186
  try {
187
- props.put(key, propsMap.getInt(key));
187
+ props.put(key, propsMap.getDouble(key));
188
188
  } catch (Throwable t1) {
189
189
  AppICEUtils.printLog(TAG, "Unhandled ReadableType.Number from ReadableMap");
190
190
  }
@@ -243,25 +243,25 @@ public class AppIceReactPluginModule extends ReactContextBaseJavaModule {
243
243
 
244
244
  try {
245
245
  if (map.containsKey(EnumConstants.APPICE_DATE_OF_BIRTH.getValue())) {
246
- Object age = map.get(EnumConstants.APPICE_DATE_OF_BIRTH.getValue());
247
- if (age != null) {
248
- user.setDob((Integer) age);
246
+ Object dob = map.get(EnumConstants.APPICE_DATE_OF_BIRTH.getValue());
247
+ if (dob != null) {
248
+ user.setDob((Integer) dob);
249
249
  }
250
250
  }
251
251
  } catch (Exception e) {
252
252
  AppICEUtils.printLog(TAG, "setUser: dob issue " + e.getMessage());
253
253
  }
254
-
255
254
  try {
256
- if (map.containsKey(EnumConstants.APPICE_USER_EDUCATION.getValue())) {
257
- Object ed = map.get(EnumConstants.APPICE_USER_EDUCATION.getValue());
258
- if (ed != null) {
259
- user.setEducationType(ed.toString());
255
+ if (map.containsKey(EnumConstants.APPICE_USER_EDUCATION_TYPE.getValue())) {
256
+ Object edt = map.get(EnumConstants.APPICE_USER_EDUCATION_TYPE.getValue());
257
+ if (edt != null) {
258
+ user.setEducationType(edt.toString());
260
259
  }
261
260
  }
262
261
  } catch (Exception e) {
263
- AppICEUtils.printLog(TAG, "setUser: ed issue " + e.getMessage());
264
- }
262
+ AppICEUtils.printLog(TAG, "setEducationType: edt issue " + e.getMessage());
263
+ }
264
+
265
265
 
266
266
  try {
267
267
  if (map.containsKey(EnumConstants.APPICE_USER_GENDER.getValue())) {
@@ -117,10 +117,7 @@ public enum EnumConstants {
117
117
  return UserInfoConstants.EDUCATION_TYPE;
118
118
  }
119
119
 
120
- case "APPICE_USER_EDUCATION":{
121
- return "ed";
122
- }
123
-
120
+
124
121
  case "APPICE_USER_GENDER":{
125
122
  return UserInfoConstants.GENDER;
126
123
  }
@@ -150,7 +147,7 @@ public enum EnumConstants {
150
147
  }
151
148
 
152
149
  case "INBOX_TITLE":{
153
- return AppICEConstants.TITLE;
150
+ return "title";
154
151
  }
155
152
 
156
153
  case "INBOX_MESSAGE_STATUS":{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reactnative-plugin-appice",
3
- "version": "1.7.7",
3
+ "version": "1.7.8",
4
4
  "description": "appICE React Native SDK",
5
5
  "main": "index.js",
6
6
  "files": [