From 131e5af01eec0fe9e5a5c8e6b481dc8aa5a734a3 Mon Sep 17 00:00:00 2001 From: Lyubo Marinov Date: Fri, 18 Aug 2017 14:52:41 -0500 Subject: [PATCH] [RN] Fix a strange import of a feature by itself --- react/features/base/participants/components/Avatar.native.js | 2 +- react/features/mobile/image-cache/functions.js | 2 +- react/features/mobile/image-cache/index.js | 1 + react/features/mobile/image-cache/middleware.js | 5 ++--- .../mobile/image-cache/react-native-img-cache.android.js | 1 + .../mobile/image-cache/react-native-img-cache.ios.js | 1 + .../mobile/image-cache/react-native-img-cache.yes.js | 1 + 7 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 react/features/mobile/image-cache/react-native-img-cache.android.js create mode 100644 react/features/mobile/image-cache/react-native-img-cache.ios.js create mode 100644 react/features/mobile/image-cache/react-native-img-cache.yes.js diff --git a/react/features/base/participants/components/Avatar.native.js b/react/features/base/participants/components/Avatar.native.js index 057f18d45..68aeb2ead 100644 --- a/react/features/base/participants/components/Avatar.native.js +++ b/react/features/base/participants/components/Avatar.native.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import { View } from 'react-native'; -import { CachedImage, ImageCache } from 'react-native-img-cache'; +import { CachedImage, ImageCache } from '../../../mobile/image-cache'; import { Platform } from '../../react'; import { ColorPalette } from '../../styles'; diff --git a/react/features/mobile/image-cache/functions.js b/react/features/mobile/image-cache/functions.js index 52e5188f2..5da9e1fdb 100644 --- a/react/features/mobile/image-cache/functions.js +++ b/react/features/mobile/image-cache/functions.js @@ -1,4 +1,4 @@ -import { ImageCache } from 'react-native-img-cache'; +import { ImageCache } from './'; /** * Notifies about the successful download of an Image source. The name diff --git a/react/features/mobile/image-cache/index.js b/react/features/mobile/image-cache/index.js index e975ed0e8..fe9b03ad4 100644 --- a/react/features/mobile/image-cache/index.js +++ b/react/features/mobile/image-cache/index.js @@ -1,3 +1,4 @@ export * from './functions'; +export * from './react-native-img-cache'; import './middleware'; diff --git a/react/features/mobile/image-cache/middleware.js b/react/features/mobile/image-cache/middleware.js index aa6d6080f..46cf35f42 100644 --- a/react/features/mobile/image-cache/middleware.js +++ b/react/features/mobile/image-cache/middleware.js @@ -1,7 +1,5 @@ /* @flow */ -import { ImageCache } from 'react-native-img-cache'; - import { APP_WILL_MOUNT } from '../../app'; import { CONFERENCE_FAILED, CONFERENCE_LEFT } from '../../base/conference'; import { @@ -13,7 +11,8 @@ import { PARTICIPANT_UPDATED } from '../../base/participants'; import { MiddlewareRegistry } from '../../base/redux'; -import { prefetch } from '../../mobile/image-cache'; + +import { ImageCache, prefetch } from './'; /** * The indicator which determines whether avatar URLs are to be prefetched in diff --git a/react/features/mobile/image-cache/react-native-img-cache.android.js b/react/features/mobile/image-cache/react-native-img-cache.android.js new file mode 100644 index 000000000..4e95cd4af --- /dev/null +++ b/react/features/mobile/image-cache/react-native-img-cache.android.js @@ -0,0 +1 @@ +export * from './react-native-img-cache.yes.js'; diff --git a/react/features/mobile/image-cache/react-native-img-cache.ios.js b/react/features/mobile/image-cache/react-native-img-cache.ios.js new file mode 100644 index 000000000..4e95cd4af --- /dev/null +++ b/react/features/mobile/image-cache/react-native-img-cache.ios.js @@ -0,0 +1 @@ +export * from './react-native-img-cache.yes.js'; diff --git a/react/features/mobile/image-cache/react-native-img-cache.yes.js b/react/features/mobile/image-cache/react-native-img-cache.yes.js new file mode 100644 index 000000000..5ba7d7413 --- /dev/null +++ b/react/features/mobile/image-cache/react-native-img-cache.yes.js @@ -0,0 +1 @@ +export { CachedImage, ImageCache } from 'react-native-img-cache';