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

use application context to avoid deallocated view error #75

Merged
merged 3 commits into from
Nov 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public void setSrc(ImageViewWithUrl view, @Nullable ReadableMap source) {
eventEmitter.receiveEvent(viewId, REACT_ON_LOAD_START_EVENT, new WritableNativeMap());

Glide
.with(view.getContext())
.with(view.getContext().getApplicationContext())
.load(glideUrl)
.priority(priority)
.placeholder(TRANSPARENT_DRAWABLE)
Expand Down
2 changes: 1 addition & 1 deletion ios/FastImage/FFFastImageView.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#import <SDWebImage/UIImageView+WebCache.h>
#import <SDWebImage/SDWebImageDownloader.h>
#import "FLAnimatedImageView.h"
#import <FLAnimatedImage/FLAnimatedImageView.h>

#import <React/RCTComponent.h>
#import <React/RCTResizeMode.h>
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"format": "prettier --write --no-semi --single-quote --trailing-comma all ./FastImage.js ./example/*.js ./server/*.js",
"test": "yarn run test:pretty && yarn run test:jest",
"test:jest": "jest *.js",
"test:pretty": "prettier-check --write --no-semi --single-quote --trailing-comma all ./FastImage.js ./example/*.js ./server/*.js"
"test:pretty": "prettier-check --write --no-semi --single-quote --trailing-comma all ./FastImage.js ./example/*.js ./server/*.js",
"postinstall": "git clone https://github.com/rs/SDWebImage.git ios/Vendor/SDWebImage && cd ios/Vendor/SDWebImage && git submodule update --init --recursive && cd ../../.."
},
"devDependencies": {
"babel-jest": "^20.0.3",
Expand Down