Skip to content

Commit 873315e

Browse files
committed
Add version 2.13.1
1 parent a74d30d commit 873315e

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [2.13.1]
2+
3+
### Fixed
4+
5+
* Fixed enabling serialization would crash the application on Android when exporting.
6+
17
## [2.13.0]
28

39
### Changed

android/src/main/java/ly/img/react_native/pesdk/RNPhotoEditorSDKModule.kt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,15 @@ class RNPhotoEditorSDKModule(val reactContext: ReactApplicationContext) : ReactC
6868

6969
val serializationConfig = currentConfig?.export?.serialization
7070

71-
val serialization: Any? = if (serializationConfig?.enabled == true) {
71+
var serialization: Any? = null
72+
if (serializationConfig?.enabled == true) {
7273
val settingsList = data.settingsList
7374
skipIfNotExists {
7475
settingsList.let { settingsList ->
7576
if (serializationConfig.embedSourceImage == true) {
7677
Log.i("ImgLySdk", "EmbedSourceImage is currently not supported by the Android SDK")
7778
}
78-
when (serializationConfig.exportType) {
79+
serialization = when (serializationConfig.exportType) {
7980
SerializationExportType.FILE_URL -> {
8081
val uri = serializationConfig.filename?.let {
8182
Uri.parse("$it.json")
@@ -94,13 +95,10 @@ class RNPhotoEditorSDKModule(val reactContext: ReactApplicationContext) : ReactC
9495
}
9596
}
9697
}
98+
settingsList.release()
9799
} ?: run {
98100
Log.i("ImgLySdk", "You need to include 'backend:serializer' Module, to use serialisation!")
99-
null
100101
}
101-
settingsList.release()
102-
} else {
103-
null
104102
}
105103

106104
currentPromise?.resolve(

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-native-photoeditorsdk",
33
"title": "React Native module for PhotoEditor SDK",
4-
"version": "2.13.0",
4+
"version": "2.13.1",
55
"description": "A React Native module for PhotoEditor SDK. Integrate the photo editor into your own HTML5, iOS or Android app - in minutes!",
66
"main": "index.js",
77
"typings": "index.d.ts",
@@ -38,6 +38,6 @@
3838
"react-native": ">=0.60.0 <1.0.x"
3939
},
4040
"dependencies": {
41-
"react-native-imglysdk": "2.13.0"
41+
"react-native-imglysdk": "2.13.1"
4242
}
4343
}

0 commit comments

Comments
 (0)