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
} from 'react-native'
import FastImage from 'react-native-fast-image'
import { PanGestureHandler } from 'react-native-gesture-handler'
import { SwipeListView } from 'react-native-swipe-list-view'
import { useDispatch, useSelector } from 'react-redux'
import formatText from '../formatText'
@ -153,20 +154,24 @@ const ComposeDraftsListRoot: React.FC<Props> = ({ timestamp }) => {
return (
<>
<PanGestureHandler enabled={true}>
<SwipeListView
data={localDrafts}
renderItem={renderItem}
renderHiddenItem={renderHiddenItem}
disableRightSwipe={true}
rightOpenValue={-actionWidth}
// previewRowKey={
// localDrafts?.length ? localDrafts[0].timestamp.toString() : undefined
// }
previewRowKey={
localDrafts?.length
? localDrafts[0].timestamp.toString()
: undefined
}
// previewDuration={350}
// previewOpenValue={-actionWidth / 2}
previewOpenValue={-actionWidth / 2}
ItemSeparatorComponent={ComponentSeparator}
keyExtractor={item => item.timestamp.toString()}
/>
</PanGestureHandler>
<Modal
transparent
animationType='fade'