Skip to content

Commit

Permalink
fix storage permissions backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
siddarthkay committed Nov 3, 2023
1 parent aa83f2d commit 91a844c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/react_native/platform.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
(def ios? (= os "ios"))

(def low-device? (and android? (< version 29)))

(def is-below-android-13? (and android? (< version 33)))
3 changes: 2 additions & 1 deletion src/status_im2/contexts/chat/composer/actions/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@
{:keys [height]}
insets]
(permissions/request-permissions
{:permissions [:read-media-images :write-external-storage]
{:permissions [(if platform/is-below-android-13? :read-external-storage :read-media-images)
:write-external-storage]
:on-allowed (fn []
(when (and platform/android? @input-ref)
(.blur ^js @input-ref))
Expand Down

0 comments on commit 91a844c

Please sign in to comment.