@exodus/react-native-screenshot-detector 1.2.5-exodus.0 → 1.2.6
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.
- package/android/build.gradle +1 -1
- package/index.android.js +16 -1
- package/package.json +2 -2
package/android/build.gradle
CHANGED
package/index.android.js
CHANGED
|
@@ -2,12 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
import { NativeModules } from 'react-native'
|
|
4
4
|
|
|
5
|
+
const { RNScreenshotDetector } = NativeModules
|
|
6
|
+
|
|
5
7
|
const unsubscribe = () => {}
|
|
6
8
|
const subscribe = () => unsubscribe
|
|
7
9
|
|
|
10
|
+
const disableScreenshots = () => {
|
|
11
|
+
if (RNScreenshotDetector && RNScreenshotDetector.disableScreenshots) {
|
|
12
|
+
RNScreenshotDetector.disableScreenshots()
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const enableScreenshots = () => {
|
|
17
|
+
if (RNScreenshotDetector && RNScreenshotDetector.enableScreenshots) {
|
|
18
|
+
RNScreenshotDetector.enableScreenshots()
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
8
22
|
const Detector = {
|
|
9
|
-
...NativeModules.RNScreenshotDetector,
|
|
10
23
|
subscribe,
|
|
24
|
+
disableScreenshots,
|
|
25
|
+
enableScreenshots,
|
|
11
26
|
}
|
|
12
27
|
|
|
13
28
|
export default Detector
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/react-native-screenshot-detector",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "detect when the user takes a screenshot",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"author": "gcarling",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "https://github.com/
|
|
14
|
+
"url": "https://github.com/ExodusMovement/react-native-screenshot-detector"
|
|
15
15
|
},
|
|
16
16
|
"license": "MIT"
|
|
17
17
|
}
|