Zhiyuan Zheng 2021-02-09 00:28:21 +01:00
parent b842458626
commit 1f4108c2d4
No known key found for this signature in database
GPG Key ID: 078A93AB607D85E0
1 changed files with 19 additions and 14 deletions

View File

@ -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'