fix js delete torrent bug
This commit is contained in:
parent
f789be22c9
commit
73e41ba7d5
1 changed files with 2 additions and 2 deletions
|
|
@ -40,7 +40,7 @@ const DeleteTorrentModal = ({ id, show, onHide }) => {
|
|||
const [error, setError] = useState<Error>(null);
|
||||
const [deleting, setDeleting] = useState(false);
|
||||
|
||||
const refreshCtx = useContext(RefreshTorrentStatsContext);
|
||||
const ctx = useContext(AppContext);
|
||||
|
||||
const close = () => {
|
||||
setDeleteFiles(false);
|
||||
|
|
@ -55,7 +55,7 @@ const DeleteTorrentModal = ({ id, show, onHide }) => {
|
|||
const call = deleteFiles ? API.delete : API.forget;
|
||||
|
||||
call(id).then(() => {
|
||||
refreshCtx.refresh();
|
||||
ctx.refreshTorrents();
|
||||
close();
|
||||
}).catch((e) => {
|
||||
setError({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue