1
0
mirror of https://github.com/tooot-app/app synced 2024-12-22 07:34:06 +01:00
This commit is contained in:
xmflsct 2022-12-09 00:35:02 +01:00
parent 7a14c89e5b
commit 4a28d47b41
2 changed files with 6 additions and 11 deletions

View File

@ -12,7 +12,7 @@
"start": "react-native start", "start": "react-native start",
"android": "react-native run-android", "android": "react-native run-android",
"iphone": "react-native run-ios --simulator 'iPhone 14 Pro'", "iphone": "react-native run-ios --simulator 'iPhone 14 Pro'",
"ipad": "react-native run-ios --simulator 'iPad Pro (11-inch) (3rd generation)'", "ipad": "react-native run-ios --simulator 'iPad Pro (11-inch) (4th generation)'",
"app:build": "bundle exec fastlane", "app:build": "bundle exec fastlane",
"clean": "react-native-clean-project", "clean": "react-native-clean-project",
"postinstall": "patch-package" "postinstall": "patch-package"

View File

@ -159,22 +159,23 @@ const ComposeDraftsListRoot: React.FC<Props> = ({ timestamp }) => {
data={instanceDrafts} data={instanceDrafts}
renderItem={renderItem} renderItem={renderItem}
renderHiddenItem={({ item }) => ( renderHiddenItem={({ item }) => (
<View <Pressable
style={{ style={{
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'flex-end', justifyContent: 'flex-end',
backgroundColor: colors.red backgroundColor: colors.red
}} }}
onPress={() => dispatch(removeInstanceDraft(item.timestamp))}
children={ children={
<Pressable <View
style={{ style={{
flexBasis: flexBasis:
StyleConstants.Font.Size.L + StyleConstants.Spacing.Global.PagePadding * 4, StyleConstants.Font.Size.L + StyleConstants.Spacing.Global.PagePadding * 4,
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center' alignItems: 'center',
backgroundColor: 'rgba(0, 255, 0, 0.2)'
}} }}
onPress={() => dispatch(removeInstanceDraft(item.timestamp))}
children={ children={
<Icon <Icon
name='Trash' name='Trash'
@ -188,12 +189,6 @@ const ComposeDraftsListRoot: React.FC<Props> = ({ timestamp }) => {
)} )}
disableRightSwipe={true} disableRightSwipe={true}
rightOpenValue={-actionWidth} rightOpenValue={-actionWidth}
// previewRowKey={
// instanceDrafts?.length
// ? instanceDrafts[0].timestamp.toString()
// : undefined
// }
// previewDuration={350}
previewOpenValue={-actionWidth / 2} previewOpenValue={-actionWidth / 2}
ItemSeparatorComponent={ComponentSeparator} ItemSeparatorComponent={ComponentSeparator}
keyExtractor={item => item.timestamp.toString()} keyExtractor={item => item.timestamp.toString()}