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

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,20 +186,22 @@ 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
193
193
  val endDate = sensor.endDate
194
194
  val sensorId = sensor.sensorId
195
- val currentPatientId = patientId
195
+ /* val currentPatientId = patientId
196
196
  val lastPatientId = prefsHelper?.lastPatientId
197
- val lastSensorId = prefsHelper?.qrInformation?.sensor
197
+ val lastSensorId = prefsHelper?.qrInformation?.sensor */
198
+
198
199
 
199
- if (lastPatientId != null && lastSensorId != null && (lastPatientId != currentPatientId || lastSensorId != sensorId)) {
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
+ } */
203
205
 
204
206
  if (isCurrentDateInRange(startDate, endDate)) {
205
207
  println("Current date is in range")
@@ -215,8 +217,9 @@ class CgmTrackyLibModule(reactContext: ReactApplicationContext) :
215
217
  pocDevice.qrMessage, envType
216
218
  )
217
219
  } else {
218
- prefsHelper?.lastPatientId = currentPatientId
219
- prefsHelper?.qrInformation?.sensor = sensorId
220
+ /* prefsHelper?.lastPatientId = currentPatientId
221
+ prefsHelper?.qrInformation?.sensor = sensorId
222
+ */
220
223
  }
221
224
  } else {
222
225
  postEventDataToAPI(
@@ -595,9 +598,10 @@ class CgmTrackyLibModule(reactContext: ReactApplicationContext) :
595
598
 
596
599
  CoroutineScope(Dispatchers.IO).launch {
597
600
  // Step 1: Clear DB first if needed
598
- if (isForClear) {
601
+ /* if (isForClear) {
602
+ Log.d("delete1111-observe", "observe delete")
599
603
  mModel.clearAllGlucoseAndDeviceData() // suspend or blocking DB operation
600
- }
604
+ } */
601
605
 
602
606
  // Step 2: Back to main thread to stop observers and proceed
603
607
  withContext(Dispatchers.Main) {
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.60",
4
4
  "description": "a package to inject data into visit health pwa",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",