fix (thumbnail): thumbnail refresh

whenever uploading something with files and folders, the thumbnails
would flash on and off all the time. The commit
a0540eecae only address part of the issue,
this commit take care of the other bits
This commit is contained in:
MickaelK 2024-10-08 03:27:07 +11:00
parent 93908f8c6d
commit 08cd2dbecb

View file

@ -111,7 +111,8 @@ export function mkdir(path) {
* @override
*/
async afterSuccess() {
removeLoading(virtualFiles$, basepath, dirname);
if (basepath === currentPath()) removeLoading(virtualFiles$, basepath, dirname);
else onDestroy(() => removeLoading(virtualFiles$, basepath, dirname));
onDestroy(() => statePop(virtualFiles$, basepath, dirname));
await fscache().update(basepath, ({ files = [], ...rest }) => ({
files: files.concat([file]),