expo-image 2.0.5 → 2.0.6

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 CHANGED
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 2.0.6 — 2025-02-19
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - [Android] Fixes a regression in `loadAsync` from [#34767](https://github.com/expo/expo/pull/34767). ([#34965](https://github.com/expo/expo/pull/34965) by [@alanjhughes](https://github.com/alanjhughes))
18
+
13
19
  ## 2.0.5 — 2025-02-10
14
20
 
15
21
  ### 🐛 Bug fixes
@@ -18,7 +18,7 @@ android {
18
18
  namespace "expo.modules.image"
19
19
  defaultConfig {
20
20
  versionCode 1
21
- versionName "2.0.5"
21
+ versionName "2.0.6"
22
22
  consumerProguardFiles("proguard-rules.pro")
23
23
 
24
24
  buildConfigField("boolean", "ALLOW_GLIDE_LOGS", project.properties.get("EXPO_ALLOW_GLIDE_LOGS", "false"))
@@ -1,18 +1,12 @@
1
1
  package expo.modules.image
2
2
 
3
3
  import com.bumptech.glide.Glide
4
- import com.bumptech.glide.load.model.GlideUrl
5
- import com.bumptech.glide.load.model.Headers
6
- import com.bumptech.glide.load.model.LazyHeaders
7
4
  import expo.modules.image.records.ImageLoadOptions
8
5
  import expo.modules.image.records.SourceMap
9
6
  import expo.modules.kotlin.AppContext
10
7
  import expo.modules.kotlin.exception.Exceptions
11
8
  import kotlinx.coroutines.Dispatchers
12
9
  import kotlinx.coroutines.withContext
13
- import kotlin.apply
14
- import kotlin.collections.component1
15
- import kotlin.collections.component2
16
10
 
17
11
  open class ImageLoadTask(
18
12
  private val appContext: AppContext,
@@ -23,20 +17,15 @@ open class ImageLoadTask(
23
17
  val context =
24
18
  this@ImageLoadTask.appContext.reactContext ?: throw Exceptions.ReactContextLost()
25
19
 
26
- val headers = source.headers?.let {
27
- LazyHeaders.Builder().apply {
28
- it.forEach { (key, value) ->
29
- addHeader(key, value)
30
- }
31
- }.build()
32
- } ?: Headers.DEFAULT
20
+ val sourceToLoad = source.createGlideModelProvider(context)
21
+ val model = sourceToLoad?.getGlideModel()
33
22
 
34
23
  try {
35
24
  val bitmap = withContext(Dispatchers.IO) {
36
25
  Glide
37
26
  .with(context)
38
27
  .asDrawable()
39
- .load(GlideUrl(source.uri, headers))
28
+ .load(model)
40
29
  .centerInside()
41
30
  .submit(options.maxWidth, options.maxHeight)
42
31
  .get()
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "expo-image",
3
3
  "title": "Expo Image",
4
- "version": "2.0.5",
4
+ "version": "2.0.6",
5
5
  "description": "A cross-platform, performant image component for React Native and Expo with Web support",
6
6
  "main": "src/index.ts",
7
7
  "types": "build/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "license": "MIT",
29
29
  "dependencies": {},
30
30
  "devDependencies": {
31
- "expo-module-scripts": "^4.0.3"
31
+ "expo-module-scripts": "^4.0.4"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "expo": "*",
@@ -41,5 +41,5 @@
41
41
  "optional": true
42
42
  }
43
43
  },
44
- "gitHead": "81941fa03383e748ba1b6345d9ca0d048bb5c4d1"
44
+ "gitHead": "c01c449a1d6e6e8690bfcc88a778b46781a59674"
45
45
  }