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",
"android": "react-native run-android",
"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",
"clean": "react-native-clean-project",
"postinstall": "patch-package"

View File

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