mirror of https://github.com/tooot-app/app
Fixed #14
https://github.com/jemise111/react-native-swipe-list-view/issues/473#issuecomment-663765462
This commit is contained in:
parent
b842458626
commit
1f4108c2d4
|
@ -17,6 +17,7 @@ import {
|
||||||
View
|
View
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
import FastImage from 'react-native-fast-image'
|
import FastImage from 'react-native-fast-image'
|
||||||
|
import { PanGestureHandler } from 'react-native-gesture-handler'
|
||||||
import { SwipeListView } from 'react-native-swipe-list-view'
|
import { SwipeListView } from 'react-native-swipe-list-view'
|
||||||
import { useDispatch, useSelector } from 'react-redux'
|
import { useDispatch, useSelector } from 'react-redux'
|
||||||
import formatText from '../formatText'
|
import formatText from '../formatText'
|
||||||
|
@ -153,20 +154,24 @@ const ComposeDraftsListRoot: React.FC<Props> = ({ timestamp }) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<PanGestureHandler enabled={true}>
|
||||||
<SwipeListView
|
<SwipeListView
|
||||||
data={localDrafts}
|
data={localDrafts}
|
||||||
renderItem={renderItem}
|
renderItem={renderItem}
|
||||||
renderHiddenItem={renderHiddenItem}
|
renderHiddenItem={renderHiddenItem}
|
||||||
disableRightSwipe={true}
|
disableRightSwipe={true}
|
||||||
rightOpenValue={-actionWidth}
|
rightOpenValue={-actionWidth}
|
||||||
// previewRowKey={
|
previewRowKey={
|
||||||
// localDrafts?.length ? localDrafts[0].timestamp.toString() : undefined
|
localDrafts?.length
|
||||||
// }
|
? localDrafts[0].timestamp.toString()
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
// previewDuration={350}
|
// previewDuration={350}
|
||||||
// previewOpenValue={-actionWidth / 2}
|
previewOpenValue={-actionWidth / 2}
|
||||||
ItemSeparatorComponent={ComponentSeparator}
|
ItemSeparatorComponent={ComponentSeparator}
|
||||||
keyExtractor={item => item.timestamp.toString()}
|
keyExtractor={item => item.timestamp.toString()}
|
||||||
/>
|
/>
|
||||||
|
</PanGestureHandler>
|
||||||
<Modal
|
<Modal
|
||||||
transparent
|
transparent
|
||||||
animationType='fade'
|
animationType='fade'
|
||||||
|
|
Loading…
Reference in New Issue