react-native-mytatva-rn-sdk 1.2.58 → 1.2.59

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.
@@ -186,7 +186,7 @@ class CgmTrackyLibModule(reactContext: ReactApplicationContext) :
186
186
  )*/
187
187
  val response = Gson().fromJson(apiResponse, CgmSensorResponse::class.java)
188
188
  val sensor = response.data?.firstOrNull()
189
-
189
+ Log.d("delete1111", "startingggg")
190
190
 
191
191
  if (sensor != null && !sensor.startDate.isNullOrEmpty() && !sensor.endDate.isNullOrEmpty()) {
192
192
  val startDate = sensor.startDate
@@ -196,7 +196,9 @@ class CgmTrackyLibModule(reactContext: ReactApplicationContext) :
196
196
  val lastPatientId = prefsHelper?.lastPatientId
197
197
  val lastSensorId = prefsHelper?.qrInformation?.sensor
198
198
 
199
- if (lastPatientId != null && lastSensorId != null && (lastPatientId != currentPatientId || lastSensorId != sensorId)) {
199
+
200
+ if (lastPatientId != null && lastSensorId != null && lastPatientId.isNotEmpty() && lastSensorId.isNotEmpty() && (lastPatientId != currentPatientId || lastSensorId != sensorId)) {
201
+ Log.d("delete1111", "deleting database");
200
202
  mModel.clearAllGlucoseAndDeviceData()
201
203
  return
202
204
  }
@@ -596,6 +598,7 @@ class CgmTrackyLibModule(reactContext: ReactApplicationContext) :
596
598
  CoroutineScope(Dispatchers.IO).launch {
597
599
  // Step 1: Clear DB first if needed
598
600
  if (isForClear) {
601
+ Log.d("delete1111-observe", "observe delete")
599
602
  mModel.clearAllGlucoseAndDeviceData() // suspend or blocking DB operation
600
603
  }
601
604
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-mytatva-rn-sdk",
3
- "version": "1.2.58",
3
+ "version": "1.2.59",
4
4
  "description": "a package to inject data into visit health pwa",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",