fix: adjust SwipeableItem friction and improve loading indicator display in Lists screen

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei 2025-01-23 13:06:15 +08:00
parent d565cb80c5
commit 43bebd7c41
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
2 changed files with 10 additions and 10 deletions

View File

@ -225,7 +225,7 @@ export const SwipeableItem: React.FC<SwipeableItemProps> = ({
renderRightActions={rightActions?.length ? renderRightActions : undefined}
overshootLeft={leftActions?.length ? leftActions?.length >= 1 : undefined}
overshootRight={rightActions?.length ? rightActions?.length >= 1 : undefined}
overshootFriction={3}
overshootFriction={10}
>
{children}
</Swipeable>

View File

@ -57,8 +57,8 @@ export const ListsScreen = () => {
</GroupedInsetListCard>
</View>
<View className="mt-6">
{data && (
<GroupedInsetListCard>
<GroupedInsetListCard>
{data && (
<SwipeableGroupProvider>
<Animated.FlatList
keyExtractor={keyExtractor}
@ -69,14 +69,14 @@ export const ListsScreen = () => {
ItemSeparatorComponent={ItemSeparatorComponent}
/>
</SwipeableGroupProvider>
</GroupedInsetListCard>
)}
)}
{isLoading && (
<View className="mt-1">
<LoadingIndicator />
</View>
)}
</GroupedInsetListCard>
</View>
{isLoading && (
<View className="flex-1 items-center justify-center">
<LoadingIndicator />
</View>
)}
</SafeNavigationScrollView>
)
}