DylanVann / react-native-fast-image
Showing 1 of 3 files from the diff.

@@ -16,10 +16,6 @@
Loading
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,7 +136,7 @@
Loading
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,11 +246,12 @@
Loading
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%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading