about summary refs log tree commit diff
path: root/src/view/com/composer
diff options
context:
space:
mode:
authorOllie H <renahlee@outlook.com>2023-05-02 14:27:00 -0700
committerGitHub <noreply@github.com>2023-05-02 16:27:00 -0500
commitbd80db619b5a8c35171a8c70bdbab33d53a81371 (patch)
tree34201d185662952f1413230e766b72a8389cf217 /src/view/com/composer
parent74fbb4797922cfba654ad597803dfdd57598ae8d (diff)
downloadvoidsky-bd80db619b5a8c35171a8c70bdbab33d53a81371.tar.zst
Pre-web image changes refactor (#560)
* Pre-web image changes refactor

* Remove unneeded async behavior
Diffstat (limited to 'src/view/com/composer')
-rw-r--r--src/view/com/composer/photos/Gallery.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/view/com/composer/photos/Gallery.tsx b/src/view/com/composer/photos/Gallery.tsx
index e2d95b2a4..1aa0aef7a 100644
--- a/src/view/com/composer/photos/Gallery.tsx
+++ b/src/view/com/composer/photos/Gallery.tsx
@@ -9,12 +9,15 @@ import {ImageModel} from 'state/models/media/image'
 import {Image} from 'expo-image'
 import {Text} from 'view/com/util/text/Text'
 import {isDesktopWeb} from 'platform/detection'
+import {openAltTextModal} from 'lib/media/alt-text'
+import {useStores} from 'state/index'
 
 interface Props {
   gallery: GalleryModel
 }
 
 export const Gallery = observer(function ({gallery}: Props) {
+  const store = useStores()
   const getImageStyle = useCallback(() => {
     let side: number
 
@@ -34,9 +37,9 @@ export const Gallery = observer(function ({gallery}: Props) {
   const handleAddImageAltText = useCallback(
     (image: ImageModel) => {
       Keyboard.dismiss()
-      gallery.setAltText(image)
+      openAltTextModal(store, image)
     },
-    [gallery],
+    [store],
   )
   const handleRemovePhoto = useCallback(
     (image: ImageModel) => {