Skip to content

Commit

Permalink
Merge pull request #349 from PSPDFKit/reinhard/update-on-annotations-…
Browse files Browse the repository at this point in the history
…changed

Include uuid in annotation removed event
  • Loading branch information
Reinhard Hafenscher authored Feb 12, 2020
2 parents b1abc7a + 94cea42 commit 9c065e5
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public void dispatch(RCTEventEmitter rctEventEmitter) {
annotationMap = new HashMap<>();
annotationMap.put("name", annotation.getName());
annotationMap.put("creatorName", annotation.getCreator());
annotationMap.put("uuid", annotation.getUuid());
} else {
JSONObject instantJson = new JSONObject(annotation.toInstantJson());
annotationMap = JsonUtilities.jsonObjectToMap(instantJson);
Expand Down
2 changes: 1 addition & 1 deletion ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotation.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ @implementation RCTConvert (PSPDFAnnotation)
}
} else {
// We only generate Instant JSON data for attached annotations. When an annotation is deleted, we only set the annotation uuid and name.
[annotationsJSON addObject:@{@"uuid" : annotation.uuid, @"name" : annotation.name ?: [NSNull null]}];
[annotationsJSON addObject:@{@"uuid" : annotation.uuid, @"name" : annotation.name ?: [NSNull null], @"creatorName" : annotation.user ?: [NSNull null]}];
}
}

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-pspdfkit",
"version": "1.27.2",
"version": "1.27.3",
"description": "A React Native module for the PSPDFKit library.",
"keywords": [
"react native",
Expand Down
2 changes: 1 addition & 1 deletion samples/Catalog/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Catalog",
"version": "1.27.2",
"version": "1.27.3",
"private": true,
"scripts": {
"start": "react-native start",
Expand Down
2 changes: 1 addition & 1 deletion samples/NativeCatalog/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "NativeCatalog",
"version": "1.27.2",
"version": "1.27.3",
"private": true,
"scripts": {
"android": "react-native run-android",
Expand Down

0 comments on commit 9c065e5

Please sign in to comment.