mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-31 03:28:49 +00:00
remove onDrop toast
This commit is contained in:
parent
3c28f671c5
commit
4cec766e7e
2 changed files with 0 additions and 14 deletions
|
|
@ -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);
|
||||
};
|
||||
}, []);
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Reference in a new issue