Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ios): add cancel image downloading when image remove from render #787

Merged
merged 1 commit into from
Sep 15, 2021

Conversation

numandev1
Copy link
Contributor

add cancel image downloading when isEnable will false and start image loading when isEnable will true. you can see below example

Example

const [isEnable, setIsEnable] = useState(true);

{isEnable && (
        <FastImage
          style={{width: 400, height: 400}}
          source={{
            uri: "https://upload.wikimedia.org/wikipedia/commons/f/ff/Pizigani_1367_Chart_10MB.jpg",
            priority: FastImage.priority.normal,
          }}
          resizeMode={FastImage.resizeMode.contain}
        />
      )}

Note: this feature is already implement in android but ios was missing this feature

ref:

Copy link
Owner

@DylanVann DylanVann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hadn't realized SDWebImage didn't implement this natively. Nice catch. 🚀

@DylanVann DylanVann merged commit f1588be into DylanVann:main Sep 15, 2021
github-actions bot pushed a commit that referenced this pull request Sep 15, 2021
# [8.5.0](v8.4.1...v8.5.0) (2021-09-15)

### Features

* **ios:** cancel image load when unmounted ([#787](#787)) ([f1588be](f1588be))
@github-actions
Copy link

🎉 This PR is included in version 8.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

alicayan008 pushed a commit to alicayan008/ReactNative-fast-image that referenced this pull request Jul 4, 2023
tungxuan1656 pushed a commit to tungxuan1656/react-native-fast-image that referenced this pull request Dec 26, 2023
tungxuan1656 pushed a commit to tungxuan1656/react-native-fast-image that referenced this pull request Dec 26, 2023
# [8.5.0](DylanVann/react-native-fast-image@v8.4.1...v8.5.0) (2021-09-15)

### Features

* **ios:** cancel image load when unmounted ([DylanVann#787](DylanVann#787)) ([f1588be](DylanVann@f1588be))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants