Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 56ae978
Author: shamardy <shamardy@yahoo.com>
Date:   Tue Jun 18 20:18:47 2019 +0200

    Fix Podfile.lock

commit e3b5368
Author: shamardy <shamardy@yahoo.com>
Date:   Sun Jun 16 17:11:55 2019 +0200

    fix

commit ffc4b2f
Author: shamardy <shamardy@yahoo.com>
Date:   Sun Jun 16 16:29:57 2019 +0200

    fix fast-image-class

commit a7dfa66
Author: shamardy <shamardy@yahoo.com>
Date:   Sun Jun 16 03:11:35 2019 +0200

    Squashed commit of the following:

    commit cd7f03e
    Author: shamardy <shamardy@yahoo.com>
    Date:   Sun Jun 16 02:56:31 2019 +0200

        Fixes

    commit 2cc1243
    Author: shamardy <shamardy@yahoo.com>
    Date:   Wed Jun 12 05:50:56 2019 +0200

        Use FastImage instead of Native Image

    commit d404c04
    Author: shamardy <shamardy@yahoo.com>
    Date:   Mon Jun 10 14:55:13 2019 +0200

        Squashed commit of the following:

        commit 42c89c1
        Author: shamardy <shamardy@yahoo.com>
        Date:   Mon Jun 10 14:48:12 2019 +0200

            Use react-native-fast-image for remote images
  • Loading branch information
shamardy committed Jun 18, 2019
1 parent 26bbac8 commit b3e514e
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 2 deletions.
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ android {
}

dependencies {
implementation project(':react-native-fast-image')
implementation project(':react-native-background-timer')
implementation project(':react-native-svg')
implementation 'com.android.support:multidex:1.0.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import com.aakashns.reactnativedialogs.ReactNativeDialogsPackage;
import com.facebook.react.ReactApplication;
import com.dylanvann.fastimage.FastImageViewPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
Expand Down Expand Up @@ -53,6 +54,7 @@ protected List<ReactPackage> getPackages() {
Function<String, String> callRPC = statusPackage.getCallRPC();
return Arrays.asList(
new MainReactPackage(),
new FastImageViewPackage(),
new RNMail(),
new RNFirebasePackage(),
new RNFirebaseMessagingPackage(),
Expand Down
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
rootProject.name = 'StatusIm'
include ':react-native-fast-image'
project(':react-native-fast-image').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fast-image/android')
include ':react-native-nfc-manager'
project(':react-native-nfc-manager').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-nfc-manager/android')
include ':react-native-firebase'
Expand Down
1 change: 1 addition & 0 deletions clj-rn.conf.edn
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"i18n-js"
"realm/react-native"
"dismissKeyboard"
"react-native-fast-image"
"react-native-splash-screen"
"react-native-status"
"react-native-status-keycard"
Expand Down
8 changes: 6 additions & 2 deletions components/src/status_im/ui/components/react.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@

(def text-class ((get-class "Text")))
(def text-input-class (get-class "TextInput"))
(def image-class (get-class "Image"))
(def picker-obj (lazy-get-react-property "Picker"))
(defn picker-class [] (adapt-class (picker-obj)))
(defn picker-item-class [] (adapt-class (.-Item (picker-obj))))
Expand All @@ -72,10 +71,15 @@
(and (contains? source :uri)
(:uri source))))

(def fast-image-class
(memoize
(fn []
(reagent/adapt-react-class (.-default js-dependencies/fast-image)))))

(defn image [{:keys [source] :as props}]
(when (valid-source? source)
(let [source (if (fn? source) (source) source)]
[(image-class) (assoc props :source source)])))
[(fast-image-class) (assoc props :source source)])))

(def switch-class (get-class "Switch"))

Expand Down
2 changes: 2 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ target 'StatusIm' do
pod 'SQLCipher', '~>3.0'
pod 'SSZipArchive'

pod 'react-native-fast-image', :path => '../node_modules/react-native-fast-image'

target 'StatusImTests' do
inherit! :search_paths
# Pods for testing
Expand Down
12 changes: 12 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,18 @@ PODS:
- React
- react-native-camera/RN (1.1.5):
- React
- react-native-fast-image (6.0.3):
- React
- SDWebImage (~> 5.0)
- react-native-webview (5.2.1):
- React
- React/Core (0.59.3):
- yoga (= 0.59.3.React)
- RNKeychain (3.0.0-rc.3):
- React
- SDWebImage (5.0.6):
- SDWebImage/Core (= 5.0.6)
- SDWebImage/Core (5.0.6)
- SQLCipher (3.4.2):
- SQLCipher/standard (= 3.4.2)
- SQLCipher/common (3.4.2)
Expand All @@ -88,6 +94,7 @@ DEPENDENCIES:
- React (from `../node_modules/react-native`)
- react-native-background-timer (from `../node_modules/react-native-background-timer`)
- react-native-camera (from `../node_modules/react-native-camera`)
- react-native-fast-image (from `../node_modules/react-native-fast-image`)
- react-native-webview (from `../node_modules/react-native-webview`)
- RNKeychain (from `../node_modules/react-native-keychain`)
- SQLCipher (~> 3.0)
Expand All @@ -106,6 +113,7 @@ SPEC REPOS:
- GoogleUtilities
- nanopb
- Protobuf
- SDWebImage
- SQLCipher
- SSZipArchive

Expand All @@ -116,6 +124,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-background-timer"
react-native-camera:
:path: "../node_modules/react-native-camera"
react-native-fast-image:
:path: "../node_modules/react-native-fast-image"
react-native-webview:
:path: "../node_modules/react-native-webview"
RNKeychain:
Expand All @@ -138,8 +148,10 @@ SPEC CHECKSUMS:
React: 1d605e098d69bdf08960787f3446f0a9dc2e2ccf
react-native-background-timer: bb7a98c8e97fc7c290de2d423dd09ddb73dcbcbb
react-native-camera: 68ad5143d2d0636236d46c7de8d2a6455ca52a36
react-native-fast-image: 3390cc968d598f0c6b5c710df138f4b653a87231
react-native-webview: a42108b827082f8f0333529b0772102031d5960d
RNKeychain: 627c6095cef215dd3d9804a9a9cf45ab96aa3997
SDWebImage: 920f1a2ff1ca8296ad34f6e0510a1ef1d70ac965
SQLCipher: f9fcf29b2e59ced7defc2a2bdd0ebe79b40d4990
SSZipArchive: 41455d4b8d2b6ab93990820b50dc697c2554a322
TouchID: b0640fedb86fa2db2fe1df15b61594ad49e76288
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
(def status-keycard (fn [] #js {:default #js {}}))
(def dialogs (fn [] #js {}))
(def dismiss-keyboard (fn [] #js {}))
(def fast-image #js {:FastImage #js {}})
(def image-crop-picker (fn [] #js {}))
(def image-resizer (fn [] #js {}))
(def svg #js {})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
(def camera (js-require/js-require "react-native-camera"))
(def dialogs (js-require/js-require "react-native-dialogs"))
(def dismiss-keyboard (js-require/js-require "dismissKeyboard"))
(def fast-image (js-require/js-require "react-native-fast-image"))
(def image-crop-picker (js-require/js-require "react-native-image-crop-picker"))
(def image-resizer (js-require/js-require "react-native-image-resizer"))
(def svg (js/require "react-native-svg"))
Expand Down
1 change: 1 addition & 0 deletions test/cljs/status_im/react_native/js_dependencies.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
(def http-bridge (fn [] #js {}))
(def i18n #js {:locale "en"})
(def react-native-languages #js {:language "en", :addEventListener (fn []), :removeEventListener (fn [])})
(def fast-image (fn [] #js {:FastImage #js {}}))
(def image-crop-picker (fn [] #js {}))
(def image-resizer (fn [] #js {}))
(def qr-code (fn [] #js {}))
Expand Down

0 comments on commit b3e514e

Please sign in to comment.