mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-20 01:33:56 +00:00
feat: pause seeding before deleting game
This commit is contained in:
@@ -21,11 +21,13 @@ export default function Downloads() {
|
||||
const [showBinaryNotFoundModal, setShowBinaryNotFoundModal] = useState(false);
|
||||
const [showDeleteModal, setShowDeleteModal] = useState(false);
|
||||
|
||||
const { removeGameInstaller } = useDownload();
|
||||
const { removeGameInstaller, pauseSeeding } = useDownload();
|
||||
|
||||
const handleDeleteGame = async () => {
|
||||
if (gameToBeDeleted.current)
|
||||
if (gameToBeDeleted.current) {
|
||||
await pauseSeeding(gameToBeDeleted.current);
|
||||
await removeGameInstaller(gameToBeDeleted.current);
|
||||
}
|
||||
};
|
||||
|
||||
const { lastPacket } = useDownload();
|
||||
|
||||
Reference in New Issue
Block a user