Skip to content

Commit 33e2560

Browse files
authored
Fix issue where disableAutomaticSaving did not work when useParentNavigationBar was enabled. (#389)
* Disable the `autosaveEnabled` configuration option when disabling autosave via the `disableAutomaticSaving` prop * Bump version to 1.30.7
1 parent 191ff5d commit 33e2560

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

ios/RCTPSPDFKit/RCTPSPDFKitViewManager.m

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,15 @@ @implementation RCTPSPDFKitViewManager
9898

9999
RCT_EXPORT_VIEW_PROPERTY(disableDefaultActionForTappedAnnotations, BOOL)
100100

101-
RCT_EXPORT_VIEW_PROPERTY(disableAutomaticSaving, BOOL)
101+
RCT_CUSTOM_VIEW_PROPERTY(disableAutomaticSaving, BOOL, RCTPSPDFKitView) {
102+
if (json) {
103+
view.disableAutomaticSaving = [RCTConvert BOOL:json];
104+
[view.pdfController updateConfigurationWithBuilder:^(PSPDFConfigurationBuilder *builder) {
105+
// Disable autosave in the configuration.
106+
builder.autosaveEnabled = !view.disableAutomaticSaving;
107+
}];
108+
}
109+
}
102110

103111
RCT_REMAP_VIEW_PROPERTY(color, tintColor, UIColor)
104112

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.30.6",
3+
"version": "1.30.7",
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.30.6",
3+
"version": "1.30.7",
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.30.6",
3+
"version": "1.30.7",
44
"private": true,
55
"scripts": {
66
"android": "react-native run-android",

0 commit comments

Comments
 (0)