mirror of
https://github.com/status-im/react-native-fast-image.git
synced 2025-02-23 19:58:15 +00:00
Merge pull request #182 from ligen52/master
fix bug :https://github.com/DylanVann/react-native-fast-image/issues/181
This commit is contained in:
commit
3e182dfbac
@ -4,6 +4,7 @@
|
||||
BOOL hasSentOnLoadStart;
|
||||
BOOL hasCompleted;
|
||||
BOOL hasErrored;
|
||||
NSDictionary* sizeParams;
|
||||
}
|
||||
|
||||
- (void)setResizeMode:(RCTResizeMode)resizeMode
|
||||
@ -24,7 +25,7 @@
|
||||
- (void)setOnFastImageLoad:(RCTBubblingEventBlock)onFastImageLoad {
|
||||
_onFastImageLoad = onFastImageLoad;
|
||||
if (hasCompleted) {
|
||||
_onFastImageLoad(@{});
|
||||
_onFastImageLoad(sizeParams);
|
||||
}
|
||||
}
|
||||
|
||||
@ -108,6 +109,7 @@
|
||||
@"width":[NSNumber numberWithDouble:image.size.width],
|
||||
@"height":[NSNumber numberWithDouble:image.size.height]
|
||||
};
|
||||
sizeParams = params;
|
||||
if (_onFastImageLoad) {
|
||||
_onFastImageLoad(params);
|
||||
}
|
||||
|
@ -9,9 +9,9 @@
|
||||
"image",
|
||||
"priority"
|
||||
],
|
||||
"homepage": "https://github.com/DylanVann/react-native-fast-image#readme",
|
||||
"homepage": "https://github.com/ligen52/react-native-fast-image#readme",
|
||||
"bugs": {
|
||||
"url": "https://github.com/DylanVann/react-native-fast-image/issues"
|
||||
"url": "https://github.com/ligen52/react-native-fast-image/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"author": "Dylan Vann <dylanvann@gmail.com> (http://dylanvann.com)",
|
||||
@ -30,7 +30,7 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/DylanVann/react-native-fast-image.git"
|
||||
"url": "git+https://github.com/ligen52/react-native-fast-image.git"
|
||||
},
|
||||
"scripts": {
|
||||
"format": "prettier --write --no-semi --single-quote --trailing-comma all ./index.js ./ReactNativeFastImageExample/FastImage/*.js ./react-native-fast-image-server/*.js",
|
||||
|
Loading…
x
Reference in New Issue
Block a user