Skip to content

Commit 9c065e5

Browse files
author
Reinhard Hafenscher
authored
Merge pull request #349 from PSPDFKit/reinhard/update-on-annotations-changed
Include uuid in annotation removed event
2 parents b1abc7a + 94cea42 commit 9c065e5

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

android/src/main/java/com/pspdfkit/react/events/PdfViewAnnotationChangedEvent.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public void dispatch(RCTEventEmitter rctEventEmitter) {
5757
annotationMap = new HashMap<>();
5858
annotationMap.put("name", annotation.getName());
5959
annotationMap.put("creatorName", annotation.getCreator());
60+
annotationMap.put("uuid", annotation.getUuid());
6061
} else {
6162
JSONObject instantJson = new JSONObject(annotation.toInstantJson());
6263
annotationMap = JsonUtilities.jsonObjectToMap(instantJson);

ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotation.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ @implementation RCTConvert (PSPDFAnnotation)
2424
}
2525
} else {
2626
// We only generate Instant JSON data for attached annotations. When an annotation is deleted, we only set the annotation uuid and name.
27-
[annotationsJSON addObject:@{@"uuid" : annotation.uuid, @"name" : annotation.name ?: [NSNull null]}];
27+
[annotationsJSON addObject:@{@"uuid" : annotation.uuid, @"name" : annotation.name ?: [NSNull null], @"creatorName" : annotation.user ?: [NSNull null]}];
2828
}
2929
}
3030

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-pspdfkit",
3-
"version": "1.27.2",
3+
"version": "1.27.3",
44
"description": "A React Native module for the PSPDFKit library.",
55
"keywords": [
66
"react native",

samples/Catalog/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Catalog",
3-
"version": "1.27.2",
3+
"version": "1.27.3",
44
"private": true,
55
"scripts": {
66
"start": "react-native start",

samples/NativeCatalog/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "NativeCatalog",
3-
"version": "1.27.2",
3+
"version": "1.27.3",
44
"private": true,
55
"scripts": {
66
"android": "react-native run-android",

0 commit comments

Comments
 (0)