Skip to content
This repository has been archived by the owner on May 7, 2022. It is now read-only.

Commit

Permalink
Change Android module name
Browse files Browse the repository at this point in the history
  • Loading branch information
demchenkoalex committed Feb 3, 2021
1 parent df18baf commit dea51c0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import java.io.IOException

class RNAndroidURIPathModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {

override fun getName() = "RNAndroidURIPath"
override fun getName() = "RNAndroidURIPathModule"

@ReactMethod(isBlockingSynchronousMethod = true)
fun getPath(uriString: String): String {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@flyerhq/react-native-android-uri-path",
"version": "1.0.3",
"version": "2.0.1",
"description": "Get an absolute path to a file retrieved by Android's Intent.ACTION_GET_CONTENT that returns a content URI.",
"homepage": "https://github.com/flyerhq/react-native-android-uri-path#readme",
"main": "lib/index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { NativeModules, Platform } from 'react-native'

const getPath: (uriString: string) => string =
Platform.OS === 'android'
? NativeModules.RNAndroidURIPath.getPath
Platform.OS === 'android' && NativeModules.RNAndroidURIPathModule
? NativeModules.RNAndroidURIPathModule.getPath
: (uriString: string) => uriString

export default getPath

0 comments on commit dea51c0

Please sign in to comment.