expo-image 1.3.2 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/android/build.gradle +3 -3
- package/android/proguard-rules.pro +11 -8
- package/android/src/main/java/expo/modules/image/ExpoImageViewWrapper.kt +6 -1
- package/android/src/main/java/expo/modules/image/ImageViewWrapperTarget.kt +1 -1
- package/android/src/main/java/expo/modules/image/ThumbnailRequestCoordinatorExtension.kt +6 -3
- package/ios/ImageView.swift +7 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,21 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 1.3.4 — 2023-09-28
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Remove `GlideWebpDecoder` until they update their `libwebp` dependency. ([#24656](https://github.com/expo/expo/pull/24656) by [@alanjhughes](https://github.com/alanjhughes))
|
|
18
|
+
|
|
19
|
+
## 1.3.3 — 2023-09-15
|
|
20
|
+
|
|
21
|
+
### 🐛 Bug fixes
|
|
22
|
+
|
|
23
|
+
- Fixed placeholders aren't always replaced by full-size images on Android. ([#23705](https://github.com/expo/expo/pull/23705) by [@lukmccall](https://github.com/lukmccall))
|
|
24
|
+
- Fix the image components rendering incorrect assets when the Proguard is enabled on Android. ([#23704](https://github.com/expo/expo/pull/23704) by [@lukmccall](https://github.com/lukmccall))
|
|
25
|
+
- Fixed gif and awebp memory leak on Android. ([#24259](https://github.com/expo/expo/pull/24259) by [@jingpeng](https://github.com/jingpeng))
|
|
26
|
+
- Suppress "Operation cancelled by user during sending the request" error when the load request is canceled (interrupted) by a new one. ([#24279](https://github.com/expo/expo/pull/24279) by [@tsapeta](https://github.com/tsapeta))
|
|
27
|
+
|
|
13
28
|
## 1.3.2 — 2023-07-12
|
|
14
29
|
|
|
15
30
|
### 🐛 Bug fixes
|
package/android/build.gradle
CHANGED
|
@@ -50,7 +50,8 @@ android {
|
|
|
50
50
|
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
51
51
|
targetSdkVersion safeExtGet("targetSdkVersion", 33)
|
|
52
52
|
versionCode 1
|
|
53
|
-
versionName "1.3.
|
|
53
|
+
versionName "1.3.4"
|
|
54
|
+
consumerProguardFiles("proguard-rules.pro")
|
|
54
55
|
}
|
|
55
56
|
lintOptions {
|
|
56
57
|
abortOnError false
|
|
@@ -91,12 +92,11 @@ dependencies {
|
|
|
91
92
|
//noinspection GradleDynamicVersion
|
|
92
93
|
implementation 'com.facebook.react:react-native:+' // From node_modules
|
|
93
94
|
|
|
94
|
-
implementation "com.github.zjupure:webpdecoder:2.1.${GLIDE_VERSION}"
|
|
95
95
|
api "com.github.bumptech.glide:glide:${GLIDE_VERSION}"
|
|
96
96
|
kapt "com.github.bumptech.glide:compiler:${GLIDE_VERSION}"
|
|
97
97
|
api 'com.caverock:androidsvg-aar:1.4'
|
|
98
98
|
|
|
99
|
-
implementation "com.github.penfeizhou.android.animation:glide-plugin:2.
|
|
99
|
+
implementation "com.github.penfeizhou.android.animation:glide-plugin:2.28.0"
|
|
100
100
|
implementation "com.github.bumptech.glide:avif-integration:${GLIDE_VERSION}"
|
|
101
101
|
|
|
102
102
|
api 'com.github.bumptech.glide:okhttp3-integration:4.11.0'
|
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
# https://bumptech.github.io/glide/doc/download-setup.html#proguard
|
|
2
2
|
|
|
3
|
-
-keep public class *
|
|
3
|
+
-keep public class * extends com.bumptech.glide.module.LibraryGlideModule
|
|
4
4
|
-keep public class * implements com.bumptech.glide.module.GlideModule
|
|
5
|
-
-keep
|
|
5
|
+
-keep class * extends com.bumptech.glide.module.AppGlideModule {
|
|
6
|
+
<init>(...);
|
|
7
|
+
}
|
|
6
8
|
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
|
|
7
9
|
**[] $VALUES;
|
|
8
10
|
public *;
|
|
9
11
|
}
|
|
12
|
+
-keep class com.bumptech.glide.load.data.ParcelFileDescriptorRewinder$InternalRewinder {
|
|
13
|
+
*** rewind();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
-keep public class com.bumptech.glide.request.ThumbnailRequestCoordinator {
|
|
17
|
+
*;
|
|
18
|
+
}
|
|
10
19
|
|
|
11
20
|
-dontwarn com.bumptech.glide.load.resource.bitmap.VideoDecoder
|
|
12
21
|
|
|
13
22
|
# https://bumptech.github.io/glide/doc/configuration.html#applications
|
|
14
23
|
|
|
15
|
-
-keep public class * extends com.bumptech.glide.module.AppGlideModule
|
|
16
|
-
-keep public class expo.modules.image.svg.SVGModule
|
|
17
24
|
-keep class com.bumptech.glide.GeneratedAppGlideModuleImpl
|
|
18
25
|
|
|
19
26
|
-keep public class com.bumptech.glide.integration.webp.WebpImage { *; }
|
|
20
27
|
-keep public class com.bumptech.glide.integration.webp.WebpFrame { *; }
|
|
21
28
|
-keep public class com.bumptech.glide.integration.webp.WebpBitmapFactory { *; }
|
|
22
|
-
|
|
23
|
-
-keep public class com.bumptech.glide.requestThumbnailRequestCoordinator {
|
|
24
|
-
*;
|
|
25
|
-
}
|
|
@@ -316,7 +316,12 @@ class ExpoImageViewWrapper(context: Context, appContext: AppContext) : ExpoView(
|
|
|
316
316
|
|
|
317
317
|
firstView
|
|
318
318
|
.recycleView()
|
|
319
|
-
?.
|
|
319
|
+
?.apply {
|
|
320
|
+
// The current target is already bound to the view. We don't want to cancel it in that case.
|
|
321
|
+
if (this != target) {
|
|
322
|
+
clear(requestManager)
|
|
323
|
+
}
|
|
324
|
+
}
|
|
320
325
|
|
|
321
326
|
configureView(firstView, target, resource, isPlaceholder)
|
|
322
327
|
if (transitionDuration > 0) {
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
package expo.modules.image
|
|
2
2
|
|
|
3
|
+
import android.util.Log
|
|
3
4
|
import com.bumptech.glide.request.Request
|
|
4
5
|
import com.bumptech.glide.request.ThumbnailRequestCoordinator
|
|
5
6
|
|
|
6
7
|
fun ThumbnailRequestCoordinator.getPrivateFullRequest(): Request? {
|
|
7
|
-
return
|
|
8
|
+
return getPrivateFiled("full")
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
private fun ThumbnailRequestCoordinator.
|
|
11
|
+
private fun <T> ThumbnailRequestCoordinator.getPrivateFiled(name: String): T? {
|
|
11
12
|
return try {
|
|
12
13
|
val filed = this.javaClass.getDeclaredField(name)
|
|
13
14
|
filed.isAccessible = true
|
|
14
|
-
|
|
15
|
+
@Suppress("UNCHECKED_CAST")
|
|
16
|
+
filed.get(this) as T
|
|
15
17
|
} catch (e: Throwable) {
|
|
18
|
+
Log.e("ExpoImage", "Couldn't receive the `$name` field", e)
|
|
16
19
|
null
|
|
17
20
|
}
|
|
18
21
|
}
|
package/ios/ImageView.swift
CHANGED
|
@@ -197,7 +197,13 @@ public final class ImageView: ExpoView {
|
|
|
197
197
|
_ imageUrl: URL?
|
|
198
198
|
) {
|
|
199
199
|
if let error = error {
|
|
200
|
-
|
|
200
|
+
let code = (error as NSError).code
|
|
201
|
+
|
|
202
|
+
// SDWebImage throws an error when loading operation is canceled (interrupted) by another load request.
|
|
203
|
+
// We do want to ignore that one and wait for the new request to load.
|
|
204
|
+
if code != SDWebImageError.cancelled.rawValue {
|
|
205
|
+
onError(["error": error.localizedDescription])
|
|
206
|
+
}
|
|
201
207
|
return
|
|
202
208
|
}
|
|
203
209
|
guard finished else {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-image",
|
|
3
3
|
"title": "Expo Image",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.4",
|
|
5
5
|
"description": "A cross-platform, performant image component for React Native and Expo with Web support",
|
|
6
6
|
"main": "build/index.js",
|
|
7
7
|
"types": "build/index.d.ts",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"expo": "*"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "b0019af6dd5a36e908618c388ab5f3053afc61c0"
|
|
37
37
|
}
|