bug #3232 - fixed profile image setting

Signed-off-by: alwxndr <alwxndr@gmail.com>
This commit is contained in:
Goran Jovic 2018-02-09 17:20:34 +01:00 committed by alwxndr
parent ce524507da
commit 8696629b66
No known key found for this signature in database
GPG Key ID: 69AE782ACD540F0B
2 changed files with 6 additions and 2 deletions

View File

@ -7,7 +7,9 @@
(def default-camera (.-default js-dependecies/camera))
(defn constants [t]
(-> (object/get js-dependecies/camera "constants" t)
(-> js-dependecies/camera
(object/get "constants")
(object/get t)
(js->clj)
(walk/keywordize-keys)))

View File

@ -6,7 +6,9 @@
[status-im.react-native.js-dependencies :as rn-dependencies]))
(defn- resize [path max-width max-height on-resize on-error]
(let [resize-fn (object/get rn-dependencies/image-resizer "default" "createResizedImage")]
(let [resize-fn (-> rn-dependencies/image-resizer
(object/get "default")
(object/get "createResizedImage"))]
(-> (resize-fn path max-width max-height "JPEG" 75 0 nil)
(.then on-resize)
(.catch on-error))))