@takeoffmedia/react-native-penthera 0.8.1 → 0.8.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.
@@ -215,17 +215,19 @@ class OfflineVideoEngine(private val context: ReactApplicationContext) {
215
215
  if (columnName == "eap") {
216
216
  eap = value
217
217
  }
218
- if (columnName == "creationTime") {
219
- creationTime = value
220
- }
221
218
  if (columnName == "activePercentOfDownloads") {
222
219
  val percentage = value.toDouble() * 100
223
220
  val isComplete = percentage == 100.0
224
221
  dataMap["isCompleted"] = isComplete
225
222
  }
223
+ if (columnName == "creationTime") {
224
+ creationTime = value
225
+ }
226
226
  if (columnName == "firstPlayTime") {
227
+ if(value != "0") {
228
+ creationTime = value
229
+ }
227
230
  (dataMap["data"] as? MutableMap<String, Any> ?: mutableMapOf()).apply {
228
- put("creationTime", if (value == "0") creationTime else value)
229
231
  put("effectiveExpiryDate", if (value == "0") ead else eap);
230
232
  put("isReproduced", value != "0");
231
233
  }.also { dataMap["data"] = it }
@@ -233,6 +235,7 @@ class OfflineVideoEngine(private val context: ReactApplicationContext) {
233
235
  }
234
236
  }
235
237
  dataMap["isPaused"] = false
238
+ dataMap["creationTime"] = creationTime
236
239
  completedList.add(dataMap)
237
240
  }
238
241
  cursor.close()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takeoffmedia/react-native-penthera",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "test",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",