about summary refs log tree commit diff
path: root/src/view/com/modals/Modal.web.tsx
diff options
context:
space:
mode:
authorMary <148872143+mary-ext@users.noreply.github.com>2024-09-24 23:21:06 +0700
committerGitHub <noreply@github.com>2024-09-25 01:21:06 +0900
commited512d6dc5390555232bb4ac3f96f477751c33b1 (patch)
tree4ef4f2eaf1ea6d0d2da9ccb67a857deb40ecd76f /src/view/com/modals/Modal.web.tsx
parent8ea89469ef1a7988a7b3d05716da55e9da680c35 (diff)
downloadvoidsky-ed512d6dc5390555232bb4ac3f96f477751c33b1.tar.zst
Revamp edit image alt text dialog (#5461)
* revamp alt dialog

* readd the limit check

don't trim with enforceLen, it ruins copy-pasting long text and it's overall annoying behavior

* Update src/view/com/composer/photos/ImageAltTextDialog.tsx

Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>

---------

Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
Diffstat (limited to 'src/view/com/modals/Modal.web.tsx')
-rw-r--r--src/view/com/modals/Modal.web.tsx9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/view/com/modals/Modal.web.tsx b/src/view/com/modals/Modal.web.tsx
index fe24695d2..c1024751f 100644
--- a/src/view/com/modals/Modal.web.tsx
+++ b/src/view/com/modals/Modal.web.tsx
@@ -2,13 +2,12 @@ import React from 'react'
 import {StyleSheet, TouchableWithoutFeedback, View} from 'react-native'
 import Animated, {FadeIn, FadeOut} from 'react-native-reanimated'
 
+import {usePalette} from '#/lib/hooks/usePalette'
 import {useWebBodyScrollLock} from '#/lib/hooks/useWebBodyScrollLock'
+import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
 import type {Modal as ModalIface} from '#/state/modals'
 import {useModalControls, useModals} from '#/state/modals'
-import {usePalette} from 'lib/hooks/usePalette'
-import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
 import * as AddAppPassword from './AddAppPasswords'
-import * as AltTextImageModal from './AltImage'
 import * as ChangeEmailModal from './ChangeEmail'
 import * as ChangeHandleModal from './ChangeHandle'
 import * as ChangePasswordModal from './ChangePassword'
@@ -53,7 +52,7 @@ function Modal({modal}: {modal: ModalIface}) {
   }
 
   const onPressMask = () => {
-    if (modal.name === 'crop-image' || modal.name === 'alt-text-image') {
+    if (modal.name === 'crop-image') {
       return // dont close on mask presses during crop
     }
     closeModal()
@@ -88,8 +87,6 @@ function Modal({modal}: {modal: ModalIface}) {
     element = <ContentLanguagesSettingsModal.Component />
   } else if (modal.name === 'post-languages-settings') {
     element = <PostLanguagesSettingsModal.Component />
-  } else if (modal.name === 'alt-text-image') {
-    element = <AltTextImageModal.Component {...modal} />
   } else if (modal.name === 'verify-email') {
     element = <VerifyEmailModal.Component {...modal} />
   } else if (modal.name === 'change-email') {