react-native-fast-image 9.2.1 → 9.2.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.
package/README.md CHANGED
@@ -76,6 +76,8 @@ To set the cache's size when the app starts, see [Native config](#native-config)
76
76
 
77
77
  If your Android app has its own Glide `AppGlideModule`, read [using FastImage with an AppGlideModule](docs/android-build-settings.md#if-your-app-has-its-own-appglidemodule) first, or FastImage may not work.
78
78
 
79
+ On iOS, FastImage works with SDWebImage 5.11.1 and later, but apps that run on iOS 26 or later need 5.21.4 or later: earlier versions can crash there while loading images ([SDWebImage#3849](https://github.com/SDWebImage/SDWebImage/issues/3849)). A new install gets the latest version. If your `Podfile.lock` has an older one, update it with `cd ios && pod update SDWebImage`.
80
+
79
81
  ## Usage
80
82
 
81
83
  ```jsx
@@ -529,9 +531,9 @@ for (const result of results) {
529
531
  }
530
532
  ```
531
533
 
532
- Each source's `cache` applies, as for a view: with `web` the preload follows the HTTP cache, and with `cacheOnly` it doesn't download. A `cacheOnly` preload resolves `ok` only if the image is cached, and loads it from the disk cache into memory, so a view shows it at once.
534
+ Each source's `cache` applies, as for a view: with `web` the preload follows the HTTP cache, and with `cacheOnly` it doesn't download. A `cacheOnly` preload resolves `ok` only if the image is cached.
533
535
 
534
- A source with `memoryCache: false` is only downloaded to the disk cache, without being decoded into memory, and is decoded when it's shown. Use it to preload many images, or large ones, e.g. the next pages of a feed: a decoded photo can take tens of MB of memory. Other sources are also kept decoded in memory, so they show at once.
536
+ A source with `memoryCache: false` is only downloaded to the disk cache, without being decoded into memory, and is decoded when it's shown. Use it to preload many images, or large ones, e.g. the next pages of a feed: a decoded photo can take tens of MB of memory. Other sources are decoded too. A view showing a preloaded image loads it from the cache for its own size: it doesn't wait for the network, but it fades in as other images from the disk cache do (see `transition`'s `skipOnCacheHit`).
535
537
 
536
538
  ```js
537
539
  await FastImage.preload(photos.map((uri) => ({ uri, memoryCache: false })))
@@ -1048,6 +1048,11 @@ NSString *FFFErrorMessage(NSError *error)
1048
1048
  // queue. Read and call it there, so it can't change or be released
1049
1049
  // in between (EXC_BAD_ACCESS).
1050
1050
  dispatch_async(dispatch_get_main_queue(), ^{
1051
+ // Sent before the load was cancelled (the source changed) but
1052
+ // run after: it's not the current load's progress.
1053
+ if (weakSelf.loadCount != load) {
1054
+ return;
1055
+ }
1051
1056
  RCTDirectEventBlock onProgress = weakSelf.onFastImageProgress;
1052
1057
  if (onProgress) {
1053
1058
  onProgress(@{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-fast-image",
3
- "version": "9.2.1",
3
+ "version": "9.2.2",
4
4
  "description": "FastImage, performant React Native image component.",
5
5
  "keywords": [
6
6
  "cache",