diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-09-29 13:18:37 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-09-29 16:16:39 +0530 |
| commit | bcf8a0ce1a3f4ccab01737741a22ecaf968daaff (patch) | |
| tree | 835ab4d21cd2579f1ba740baad8c38b717accdac /src | |
| parent | ddcb82a71965280803fd50175aade3c05dd235ff (diff) | |
| download | daft-launcher-bcf8a0ce1a3f4ccab01737741a22ecaf968daaff.tar.gz daft-launcher-bcf8a0ce1a3f4ccab01737741a22ecaf968daaff.zip | |
Fix favorites list swiper + draggable list issue
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/Favorites.tsx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/components/Favorites.tsx b/src/components/Favorites.tsx index 6ee99cb..ed81a6b 100644 --- a/src/components/Favorites.tsx +++ b/src/components/Favorites.tsx @@ -50,6 +50,9 @@ export const Favorites: React.FC<{active: boolean}> = (_) => { data={favoriteApps} onDragEnd={onDragEnd} keyExtractor={(app) => app.packageName} + activationDistance={10} + scrollEnabled + renderPlaceholder={() => <View className="flex-1 bg-[#141414]" />} renderItem={({item: app, drag, isActive}) => ( <ShadowDecorator key={app.packageName}> <OpacityDecorator> @@ -57,20 +60,19 @@ export const Favorites: React.FC<{active: boolean}> = (_) => { className={`flex-row justify-stretch items-center ${ isActive ? 'bg-[#181818] opacity-60' : '' }`}> - <AppLabel app={app} /> - <TouchableOpacity onLongPress={drag} disabled={isActive} hitSlop={10} - className="p-3"> - <Icon name="drag-indicator" size={21} color="#444" /> + className="pr-2 py-3"> + <Icon name="drag-indicator" size={21} color="#222" /> </TouchableOpacity> + + <AppLabel app={app} /> </View> </OpacityDecorator> </ShadowDecorator> )} - renderPlaceholder={() => <View className="flex-1 bg-[#181818]" />} /> </View> ); |
