react-native-nitro-web-image 0.5.1 → 0.5.2

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.
@@ -23,10 +23,9 @@ class HybridWebImageLoader(private val imageLoader: ImageLoader,
23
23
  imageView.load(url, imageLoader) {
24
24
  this.applyOptions(options)
25
25
  }
26
- imageView.load(url)
27
26
  }
28
27
 
29
28
  override fun dropImage(forView: HybridNitroImageViewSpec) {
30
29
  // Coil automatically handles recycling here - I _think_.
31
30
  }
32
- }
31
+ }
@@ -52,6 +52,7 @@ fun ImageRequest.Builder.applyOptions(options: AsyncImageLoadOptions?): ImageReq
52
52
 
53
53
  if (options.cacheKey != null) {
54
54
  result = result.diskCacheKey(options.cacheKey)
55
+ result = result.memoryCacheKey(options.cacheKey)
55
56
  }
56
57
 
57
58
  return result
@@ -35,10 +35,11 @@ class HybridWebImageLoader: HybridImageLoaderSpec {
35
35
  guard let view = view as? NativeImageView else { throw RuntimeError.error(withMessage: "Invalid view type!") }
36
36
 
37
37
  let webImageOptions = options?.toSDWebImageOptions() ?? []
38
+ let webImageContext = options?.toSDWebImageContext()
38
39
  view.imageView.sd_setImage(with: url,
39
40
  placeholderImage: view.imageView.image,
40
41
  options: webImageOptions,
41
- context: nil)
42
+ context: webImageContext)
42
43
  }
43
44
 
44
45
  func dropImage(forView view: (any HybridNitroImageViewSpec)) throws {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-nitro-web-image",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "react-native-nitro-web-image",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",