mirror of
https://github.com/status-im/status-react.git
synced 2025-02-25 17:16:03 +00:00
Merge branch 'develop' of github.com:status-im/status-react into develop
This commit is contained in:
commit
0451b152b3
@ -1,6 +1,6 @@
|
|||||||
CACHED_WEBVIEWS_ENABLED=1
|
CACHED_WEBVIEWS_ENABLED=1
|
||||||
DEBUG_WEBVIEW=1
|
DEBUG_WEBVIEW=1
|
||||||
DEFAULT_NETWORK=mainnet_rpc
|
DEFAULT_NETWORK=testnet_rpc
|
||||||
ERC20_CONTRACT_WARNINGS=0
|
ERC20_CONTRACT_WARNINGS=0
|
||||||
ETHEREUM_DEV_CLUSTER=1
|
ETHEREUM_DEV_CLUSTER=1
|
||||||
EXTENSIONS=0
|
EXTENSIONS=0
|
||||||
@ -18,11 +18,13 @@ RPC_NETWORKS_ONLY=0
|
|||||||
PARTITIONED_TOPIC=0
|
PARTITIONED_TOPIC=0
|
||||||
CONTRACT_NODES=1
|
CONTRACT_NODES=1
|
||||||
STATUS_GO_ENABLE_NIMBUS=0
|
STATUS_GO_ENABLE_NIMBUS=0
|
||||||
|
COMMANDS_ENABLED=1
|
||||||
KEYCARD_TEST_MENU=0
|
KEYCARD_TEST_MENU=0
|
||||||
ENABLE_ROOT_ALERT=1
|
ENABLE_ROOT_ALERT=1
|
||||||
ENABLE_REFERRAL_INVITE=1
|
ENABLE_REFERRAL_INVITE=1
|
||||||
DISABLE_WALLET_ON_MOBILE_NETWORK=1
|
DISABLE_WALLET_ON_MOBILE_NETWORK=1
|
||||||
APN_TOPIC=im.status.ethereum.pr
|
APN_TOPIC=im.status.ethereum.pr
|
||||||
|
VERIFY_TRANSACTION_CHAIN_ID=3
|
||||||
BLANK_PREVIEW=0
|
BLANK_PREVIEW=0
|
||||||
MAX_IMAGES_BATCH=5
|
MAX_IMAGES_BATCH=5
|
||||||
GOOGLE_FREE=0
|
GOOGLE_FREE=0
|
||||||
|
@ -78,6 +78,8 @@
|
|||||||
<string>Location access is required for some DApps to function properly.</string>
|
<string>Location access is required for some DApps to function properly.</string>
|
||||||
<key>NSPhotoLibraryUsageDescription</key>
|
<key>NSPhotoLibraryUsageDescription</key>
|
||||||
<string>Photos access is required to give you the ability to send images.</string>
|
<string>Photos access is required to give you the ability to send images.</string>
|
||||||
|
<key>NSPhotoLibraryAddUsageDescription</key>
|
||||||
|
<string>Photos access is required to give you the ability to save images.</string>
|
||||||
<key>NSMicrophoneUsageDescription</key>
|
<key>NSMicrophoneUsageDescription</key>
|
||||||
<string>Need microphone access for sending audio messages.</string>
|
<string>Need microphone access for sending audio messages.</string>
|
||||||
<key>UIAppFonts</key>
|
<key>UIAppFonts</key>
|
||||||
|
@ -83,6 +83,8 @@
|
|||||||
<string>Location access is required for some DApps to function properly.</string>
|
<string>Location access is required for some DApps to function properly.</string>
|
||||||
<key>NSPhotoLibraryUsageDescription</key>
|
<key>NSPhotoLibraryUsageDescription</key>
|
||||||
<string>Photos access is required to give you the ability to send images.</string>
|
<string>Photos access is required to give you the ability to send images.</string>
|
||||||
|
<key>NSPhotoLibraryAddUsageDescription</key>
|
||||||
|
<string>Photos access is required to give you the ability to save images.</string>
|
||||||
<key>NSMicrophoneUsageDescription</key>
|
<key>NSMicrophoneUsageDescription</key>
|
||||||
<string>Need microphone access for sending audio messages.</string>
|
<string>Need microphone access for sending audio messages.</string>
|
||||||
<key>UIAppFonts</key>
|
<key>UIAppFonts</key>
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
[status-im.utils.image-processing :as image-processing]
|
[status-im.utils.image-processing :as image-processing]
|
||||||
[taoensso.timbre :as log]
|
[taoensso.timbre :as log]
|
||||||
[clojure.string :as string]
|
[clojure.string :as string]
|
||||||
|
[status-im.i18n.i18n :as i18n]
|
||||||
|
[status-im.utils.utils :as utils]
|
||||||
[status-im.utils.platform :as platform]
|
[status-im.utils.platform :as platform]
|
||||||
[status-im.chat.models :as chat]))
|
[status-im.chat.models :as chat]))
|
||||||
|
|
||||||
@ -35,24 +37,36 @@
|
|||||||
(.-localIdentifier result)
|
(.-localIdentifier result)
|
||||||
(.-path result)))
|
(.-path result)))
|
||||||
|
|
||||||
|
(defn android-save-image-to-gallery [base64-uri]
|
||||||
|
(react/image-get-size
|
||||||
|
base64-uri
|
||||||
|
(fn [width height]
|
||||||
|
(image-processing/resize
|
||||||
|
base64-uri
|
||||||
|
width
|
||||||
|
height
|
||||||
|
100
|
||||||
|
(fn [^js resized-image]
|
||||||
|
(let [path (.-path resized-image)
|
||||||
|
path (if (string/starts-with? path "file") path (str "file://" path))]
|
||||||
|
(.saveToCameraRoll CameraRoll path)))
|
||||||
|
#(log/error "could not resize image" %)))))
|
||||||
|
|
||||||
(re-frame/reg-fx
|
(re-frame/reg-fx
|
||||||
::save-image-to-gallery
|
::save-image-to-gallery
|
||||||
(fn [base64-uri]
|
(fn [base64-uri]
|
||||||
(if platform/ios?
|
(if platform/ios?
|
||||||
(.saveToCameraRoll CameraRoll base64-uri)
|
(-> (.saveToCameraRoll CameraRoll base64-uri)
|
||||||
(react/image-get-size
|
(.catch #(utils/show-popup (i18n/label :t/error)
|
||||||
base64-uri
|
(i18n/label :t/external-storage-denied))))
|
||||||
(fn [width height]
|
(permissions/request-permissions
|
||||||
(image-processing/resize
|
{:permissions [:write-external-storage]
|
||||||
base64-uri
|
:on-allowed #(android-save-image-to-gallery base64-uri)
|
||||||
width
|
:on-denied (fn []
|
||||||
height
|
(utils/set-timeout
|
||||||
100
|
#(utils/show-popup (i18n/label :t/error)
|
||||||
(fn [^js resized-image]
|
(i18n/label :t/external-storage-denied))
|
||||||
(let [path (.-path resized-image)
|
50))}))))
|
||||||
path (if (string/starts-with? path "file") path (str "file://" path))]
|
|
||||||
(.saveToCameraRoll CameraRoll path)))
|
|
||||||
#(log/error "could not resize image" %)))))))
|
|
||||||
|
|
||||||
(re-frame/reg-fx
|
(re-frame/reg-fx
|
||||||
::chat-open-image-picker-camera
|
::chat-open-image-picker-camera
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh <tag>' instead",
|
"_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh <tag>' instead",
|
||||||
"owner": "status-im",
|
"owner": "status-im",
|
||||||
"repo": "status-go",
|
"repo": "status-go",
|
||||||
"version": "v0.85.0",
|
"version": "v0.86.2",
|
||||||
"commit-sha1": "0c0e02e93af31207fedb04f98ae6161cd4bcb3df",
|
"commit-sha1": "d8d5d797dafdb5d042f0ec9eb27d0395840c57e6",
|
||||||
"src-sha256": "1dzx8f0gjn5kbwkrfidnfacvahw79p85ampmps57bp0yszvq4rnl"
|
"src-sha256": "0pl75amwyydj58l2ff8f4nv148vnsz19nhpdas6y60g145h2nfqw"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user