diff options
author | Ollie Hsieh <renahlee@outlook.com> | 2023-04-21 14:20:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-21 16:20:06 -0500 |
commit | f0706dbe9ffb758d2aa1f75c51cfa0c61cc84482 (patch) | |
tree | 40c644c4c256154660be85c9c583028ebaaedaef /src/view/com/modals/Modal.tsx | |
parent | 0f5735b616e3565c1c739e4c8007f4ea4aedba92 (diff) | |
download | voidsky-f0706dbe9ffb758d2aa1f75c51cfa0c61cc84482.tar.zst |
Add alt text support and rework image layout (#503)
* Add alt text support and rework image layout * Add additional BottomSheet implementation to account for nested Composer modal * Use mobile gallery layout on mobile web * Missing key * Fix lint * Move altimage modal into the standard modal system * Fix overflow wrapping of images * Fixes to the alt-image modal * Remove unnecessary switch * Restore old imagelayoutgrid code --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src/view/com/modals/Modal.tsx')
-rw-r--r-- | src/view/com/modals/Modal.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/view/com/modals/Modal.tsx b/src/view/com/modals/Modal.tsx index 3f10ec836..a83cdfdae 100644 --- a/src/view/com/modals/Modal.tsx +++ b/src/view/com/modals/Modal.tsx @@ -1,5 +1,5 @@ import React, {useRef, useEffect} from 'react' -import {StyleSheet, View} from 'react-native' +import {StyleSheet} from 'react-native' import {observer} from 'mobx-react-lite' import BottomSheet from '@gorhom/bottom-sheet' import {useStores} from 'state/index' @@ -11,6 +11,7 @@ import * as EditProfileModal from './EditProfile' import * as ServerInputModal from './ServerInput' import * as ReportPostModal from './ReportPost' import * as RepostModal from './Repost' +import * as AltImageModal from './AltImage' import * as ReportAccountModal from './ReportAccount' import * as DeleteAccountModal from './DeleteAccount' import * as ChangeHandleModal from './ChangeHandle' @@ -68,6 +69,9 @@ export const ModalsContainer = observer(function ModalsContainer() { } else if (activeModal?.name === 'repost') { snapPoints = RepostModal.snapPoints element = <RepostModal.Component {...activeModal} /> + } else if (activeModal?.name === 'alt-text-image') { + snapPoints = AltImageModal.snapPoints + element = <AltImageModal.Component {...activeModal} /> } else if (activeModal?.name === 'change-handle') { snapPoints = ChangeHandleModal.snapPoints element = <ChangeHandleModal.Component {...activeModal} /> @@ -81,7 +85,7 @@ export const ModalsContainer = observer(function ModalsContainer() { snapPoints = ContentFilteringSettingsModal.snapPoints element = <ContentFilteringSettingsModal.Component /> } else { - return <View /> + return null } return ( |