Skip to content

Commit

Permalink
[#17395] Temporarily disables image options in edit mode
Browse files Browse the repository at this point in the history
  • Loading branch information
SilentCruzer committed Oct 4, 2023
1 parent 69df5a7 commit a9826d6
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/status_im2/contexts/chat/composer/actions/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,12 @@
(rf/dispatch [:navigate-to :camera-screen]))))

(defn camera-button
[]
[edit]
(let [images-count (count (vals (rf/sub [:chats/sending-image])))]
[quo/composer-button
{:on-press #(go-to-camera images-count)
{:on-press (if edit
#(js/alert "This feature is temporarily unavailable in edit mode.")
#(go-to-camera images-count))
:icon :i/camera
:container-style {:margin-right 12}}]))

Expand All @@ -195,9 +197,11 @@
:t/external-storage-denied)))}))

(defn image-button
[props animations insets]
[props animations insets edit]
[quo/composer-button
{:on-press #(open-photo-selector props animations insets)
{:on-press (if edit
#(js/alert "This feature is temporarily unavailable in edit mode.")
#(open-photo-selector props animations insets))
:accessibility-label :open-images-button
:container-style {:margin-right 12}
:icon :i/image}])
Expand All @@ -223,8 +227,8 @@
[rn/view
{:style {:flex-direction :row
:display (if @(:recording? state) :none :flex)}}
[camera-button]
[image-button props animations insets]
[camera-button edit]
[image-button props animations insets edit]
[reaction-button]
[format-button]]
[:f> send-button props state animations window-height images edit send-btn-opacity
Expand Down

0 comments on commit a9826d6

Please sign in to comment.