Pre-web image changes refactor (#560)
* Pre-web image changes refactor * Remove unneeded async behavior
This commit is contained in:
parent
74fbb47979
commit
bd80db619b
5 changed files with 22 additions and 35 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue