@react-native-documents/picker 11.0.3 → 11.0.4

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.
@@ -25,7 +25,7 @@ import kotlinx.coroutines.cancel
25
25
  import kotlinx.coroutines.launch
26
26
 
27
27
  class RNDocumentPickerModule(reactContext: ReactApplicationContext) :
28
- NativeDocumentPickerSpec(reactContext), LifecycleEventListener {
28
+ NativeDocumentPickerSpec(reactContext) {
29
29
  private var currentPickOptions: PickOptions? = null
30
30
  private var currentUriOfFileBeingExported: Uri? = null
31
31
  private val promiseWrapper = PromiseWrapper(NAME)
@@ -70,15 +70,12 @@ class RNDocumentPickerModule(reactContext: ReactApplicationContext) :
70
70
  }
71
71
 
72
72
  init {
73
- reactContext.addActivityEventListener(activityEventListener)
74
- reactContext.addLifecycleEventListener(this)
73
+ reactApplicationContext.addActivityEventListener(activityEventListener)
75
74
  }
76
75
 
77
76
  override fun invalidate() {
78
77
  fileCopyingCoroutine.cancel("module invalidated")
79
78
  reactApplicationContext.removeActivityEventListener(activityEventListener)
80
- // TODO verify this should be done (and order)
81
- // reactApplicationContext.removeLifecycleEventListener(this)
82
79
  super.invalidate()
83
80
  }
84
81
 
@@ -330,12 +327,4 @@ class RNDocumentPickerModule(reactContext: ReactApplicationContext) :
330
327
  private const val E_OTHER_PRESENTING_ERROR = "OTHER_PRESENTING_ERROR"
331
328
  private const val E_INVALID_DATA_RETURNED = "INVALID_DATA_RETURNED"
332
329
  }
333
-
334
- override fun onHostResume() {}
335
-
336
- override fun onHostPause() {}
337
-
338
- override fun onHostDestroy() {
339
- fileCopyingCoroutine.cancel("host destroyed")
340
- }
341
330
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-documents/picker",
3
- "version": "11.0.3",
3
+ "version": "11.0.4",
4
4
  "description": "A react native interface to access documents from dropbox, google drive, iCloud...",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",