Skip to content

Commit

Permalink
Revert "Add layout transitions to the composer photo gallery on iOS (#…
Browse files Browse the repository at this point in the history
…3609)" (#3649)

This reverts commit 1a5b8b2.
  • Loading branch information
mozzius authored Apr 22, 2024
1 parent 94ea2a3 commit 27c4054
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 27 deletions.
17 changes: 1 addition & 16 deletions src/view/com/composer/Composer.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
import React, {
useCallback,
useEffect,
useLayoutEffect,
useMemo,
useRef,
useState,
} from 'react'
import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'
import {
ActivityIndicator,
BackHandler,
Keyboard,
KeyboardAvoidingView,
LayoutAnimation,
Platform,
ScrollView,
StyleSheet,
Expand Down Expand Up @@ -135,13 +127,6 @@ export const ComposePost = observer(function ComposePost({
() => new GalleryModel(initImageUris),
[initImageUris],
)

useLayoutEffect(() => {
if (isIOS) {
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut)
}
}, [gallery.size])

const onClose = useCallback(() => {
closeComposer()
}, [closeComposer])
Expand Down
20 changes: 9 additions & 11 deletions src/view/com/composer/photos/Gallery.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import React, {useState} from 'react'
import {ImageStyle, Keyboard, LayoutChangeEvent} from 'react-native'
import {GalleryModel} from 'state/models/media/gallery'
import {observer} from 'mobx-react-lite'
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
import {s, colors} from 'lib/styles'
import {StyleSheet, TouchableOpacity, View} from 'react-native'
import {Image} from 'expo-image'
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
import {msg, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react'
import {observer} from 'mobx-react-lite'

import {useModalControls} from '#/state/modals'
import {Text} from 'view/com/util/text/Text'
import {Dimensions} from 'lib/media/types'
import {usePalette} from 'lib/hooks/usePalette'
import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
import {Dimensions} from 'lib/media/types'
import {colors, s} from 'lib/styles'
import {Trans, msg} from '@lingui/macro'
import {useLingui} from '@lingui/react'
import {useModalControls} from '#/state/modals'
import {isNative} from 'platform/detection'
import {GalleryModel} from 'state/models/media/gallery'
import {Text} from 'view/com/util/text/Text'

const IMAGE_GAP = 8

Expand Down Expand Up @@ -198,7 +197,6 @@ const GalleryInner = observer(function GalleryImpl({
}}
accessible={true}
accessibilityIgnoresInvertColors
transition={200}
/>
</View>
))}
Expand Down

0 comments on commit 27c4054

Please sign in to comment.