From 4cec766e7e95a99cd4be55f3c40379bfd5e6fe8d Mon Sep 17 00:00:00 2001 From: nklhrstv Date: Wed, 19 Oct 2022 14:57:14 +0300 Subject: [PATCH] remove onDrop toast --- src/App/ServicesToaster.js | 10 ---------- src/services/DragAndDrop/DragAndDrop.js | 4 ---- 2 files changed, 14 deletions(-) diff --git a/src/App/ServicesToaster.js b/src/App/ServicesToaster.js index d97255914..30b36820e 100644 --- a/src/App/ServicesToaster.js +++ b/src/App/ServicesToaster.js @@ -37,14 +37,6 @@ const ServicesToaster = () => { } } }; - const onDrop = (file) => { - toast.show({ - type: 'alert', - title: 'Processing file', - message: file.name, - timeout: 4000 - }); - }; const onDragAndDropError = (error) => { toast.show({ type: 'error', @@ -54,11 +46,9 @@ const ServicesToaster = () => { }); }; core.transport.on('CoreEvent', onCoreEvent); - dragAndDrop.on('drop', onDrop); dragAndDrop.on('error', onDragAndDropError); return () => { core.transport.off('CoreEvent', onCoreEvent); - dragAndDrop.off('drop', onDrop); dragAndDrop.off('error', onDragAndDropError); }; }, []); diff --git a/src/services/DragAndDrop/DragAndDrop.js b/src/services/DragAndDrop/DragAndDrop.js index 6bdd91c55..a503911d8 100644 --- a/src/services/DragAndDrop/DragAndDrop.js +++ b/src/services/DragAndDrop/DragAndDrop.js @@ -16,10 +16,6 @@ function DragAndDrop({ core }) { const file = event.dataTransfer.files[0]; switch (file.type) { case 'application/x-bittorrent': { - events.emit('drop', { - name: file.name, - type: file.type - }); try { const torrent = await file.arrayBuffer(); core.transport.dispatch({