update traversing method

change DFS to BFS with same level folders fetched concurrently.
merge helper class into traversing func.
This commit is contained in:
myl7
2021-12-16 23:54:45 +08:00
parent f550a08e37
commit 8dcb881917
2 changed files with 46 additions and 54 deletions
+1 -1
View File
@@ -318,7 +318,7 @@ const FileListing: FunctionComponent<{ query?: ParsedUrlQuery }> = ({ query }) =
})()
setFolderGenerating({ ...folderGenerating, [id]: true })
const toastId = toast.loading('Downloading folder. Refresh to cancel, this may take some time...')
downloadTreelikeMultipleFiles(files, name).then(() => {
downloadTreelikeMultipleFiles(files, path, name).then(() => {
setFolderGenerating({ ...folderGenerating, [id]: false })
toast.dismiss(toastId)
toast.success('Finished to download folder.')