mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 12:33:26 +00:00
feat: remove download history items on long press
This commit is contained in:
@@ -6,13 +6,13 @@ import ScreenLayout from "~/components/layout/ScreenLayout";
|
||||
import { useDownloadManager } from "~/hooks/DownloadManagerContext";
|
||||
|
||||
const DownloadsScreen: React.FC = () => {
|
||||
const { downloads } = useDownloadManager();
|
||||
const { downloads, removeDownload } = useDownloadManager();
|
||||
|
||||
return (
|
||||
<ScreenLayout title="Downloads">
|
||||
<ScrollView>
|
||||
{downloads.map((item) => (
|
||||
<DownloadItem key={item.id} {...item} />
|
||||
<DownloadItem key={item.id} {...item} onLongPress={removeDownload} />
|
||||
))}
|
||||
</ScrollView>
|
||||
</ScreenLayout>
|
||||
|
Reference in New Issue
Block a user