Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
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 16, 2019
1 parent c265726 commit a7dfa66
Show file tree
Hide file tree
Showing 9 changed files with 13 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
4 changes: 2 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,7 @@

(def text-class ((get-class "Text")))
(def text-input-class (get-class "TextInput"))
(def image-class (get-class "Image"))
(def fast-image-class (get-class "fast-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 @@ -75,7 +75,7 @@
(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
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 a7dfa66

Please sign in to comment.