Skip to content

Commit

Permalink
Fix issue where disableAutomaticSaving did not work when `useParent…
Browse files Browse the repository at this point in the history
…NavigationBar` was enabled. (#389)

* Disable the `autosaveEnabled` configuration option when disabling autosave via the `disableAutomaticSaving` prop

* Bump version to 1.30.7
  • Loading branch information
radazzouz authored Feb 9, 2021
1 parent 191ff5d commit 33e2560
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
10 changes: 9 additions & 1 deletion ios/RCTPSPDFKit/RCTPSPDFKitViewManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,15 @@ @implementation RCTPSPDFKitViewManager

RCT_EXPORT_VIEW_PROPERTY(disableDefaultActionForTappedAnnotations, BOOL)

RCT_EXPORT_VIEW_PROPERTY(disableAutomaticSaving, BOOL)
RCT_CUSTOM_VIEW_PROPERTY(disableAutomaticSaving, BOOL, RCTPSPDFKitView) {
if (json) {
view.disableAutomaticSaving = [RCTConvert BOOL:json];
[view.pdfController updateConfigurationWithBuilder:^(PSPDFConfigurationBuilder *builder) {
// Disable autosave in the configuration.
builder.autosaveEnabled = !view.disableAutomaticSaving;
}];
}
}

RCT_REMAP_VIEW_PROPERTY(color, tintColor, UIColor)

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.30.6",
"version": "1.30.7",
"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.30.6",
"version": "1.30.7",
"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.30.6",
"version": "1.30.7",
"private": true,
"scripts": {
"android": "react-native run-android",
Expand Down

0 comments on commit 33e2560

Please sign in to comment.