src/index.tsx
changed.
Other files ignored by Codecov
src/__snapshots__/index.test.tsx.snap
has changed.
src/index.test.tsx
has changed.
16 | 16 | ViewProps, |
|
17 | 17 | } from 'react-native' |
|
18 | 18 | ||
19 | - | const isAndroid = Platform.OS === 'android' |
|
20 | - | ||
21 | - | const FastImageViewNativeModule = NativeModules.FastImageView |
|
22 | - | ||
23 | 19 | export type ResizeMode = 'contain' | 'cover' | 'stretch' | 'center' |
|
24 | 20 | ||
25 | 21 | const resizeMode = { |
140 | 136 | if (!defaultSource) { |
|
141 | 137 | return null |
|
142 | 138 | } |
|
143 | - | if (isAndroid) { |
|
139 | + | if (Platform.OS === 'android') { |
|
144 | 140 | // Android receives a URI string, and resolves into a Drawable using RN's methods. |
|
145 | 141 | const resolved = Image.resolveAssetSource( |
|
146 | 142 | defaultSource as ImageRequireSource, |
250 | 246 | FastImage.priority = priority |
|
251 | 247 | ||
252 | 248 | FastImage.preload = (sources: Source[]) => |
|
253 | - | FastImageViewNativeModule.preload(sources) |
|
249 | + | NativeModules.FastImageView.preload(sources) |
|
254 | 250 | ||
255 | - | FastImage.clearMemoryCache = () => FastImageViewNativeModule.clearMemoryCache() |
|
251 | + | FastImage.clearMemoryCache = () => |
|
252 | + | NativeModules.FastImageView.clearMemoryCache() |
|
256 | 253 | ||
257 | - | FastImage.clearDiskCache = () => FastImageViewNativeModule.clearDiskCache() |
|
254 | + | FastImage.clearDiskCache = () => NativeModules.FastImageView.clearDiskCache() |
|
258 | 255 | ||
259 | 256 | const styles = StyleSheet.create({ |
|
260 | 257 | imageContainer: { |
Files | Coverage |
---|---|
src/index.tsx | 100.00% |
Project Totals (1 files) | 100.00% |