46 lines
2.0 KiB
Diff
46 lines
2.0 KiB
Diff
diff --git a/node_modules/react-native-document-scanner-plugin/android/src/main/java/com/documentscanner/DocumentScannerPackage.kt b/node_modules/react-native-document-scanner-plugin/android/src/main/java/com/documentscanner/DocumentScannerPackage.kt
|
|
index 84f3fec..54a8f53 100644
|
|
--- a/node_modules/react-native-document-scanner-plugin/android/src/main/java/com/documentscanner/DocumentScannerPackage.kt
|
|
+++ b/node_modules/react-native-document-scanner-plugin/android/src/main/java/com/documentscanner/DocumentScannerPackage.kt
|
|
@@ -1,33 +1,16 @@
|
|
package com.documentscanner
|
|
|
|
-import com.facebook.react.BaseReactPackage
|
|
+import com.facebook.react.ReactPackage
|
|
import com.facebook.react.bridge.NativeModule
|
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
-import com.facebook.react.module.model.ReactModuleInfo
|
|
-import com.facebook.react.module.model.ReactModuleInfoProvider
|
|
-import java.util.HashMap
|
|
+import com.facebook.react.uimanager.ViewManager
|
|
|
|
-class DocumentScannerPackage : BaseReactPackage() {
|
|
- override fun getModule(name: String, reactContext: ReactApplicationContext): NativeModule? {
|
|
- return if (name == DocumentScannerModule.NAME) {
|
|
- DocumentScannerModule(reactContext)
|
|
- } else {
|
|
- null
|
|
- }
|
|
+class DocumentScannerPackage : ReactPackage {
|
|
+ override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
|
|
+ return listOf(DocumentScannerModule(reactContext))
|
|
}
|
|
|
|
- override fun getReactModuleInfoProvider(): ReactModuleInfoProvider {
|
|
- return ReactModuleInfoProvider {
|
|
- val moduleInfos: MutableMap<String, ReactModuleInfo> = HashMap()
|
|
- moduleInfos[DocumentScannerModule.NAME] = ReactModuleInfo(
|
|
- DocumentScannerModule.NAME,
|
|
- DocumentScannerModule.NAME,
|
|
- false, // canOverrideExistingModule
|
|
- false, // needsEagerInit
|
|
- false, // isCxxModule
|
|
- true // isTurboModule
|
|
- )
|
|
- moduleInfos
|
|
- }
|
|
+ override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
|
|
+ return emptyList()
|
|
}
|
|
}
|