Skip to content

TagSpaces is an offline, open source, document manager with tagging support

improving the notification for generating thumbs

Ilian Sapundshiev42be6ae9af7f
diff --git a/app/reducers/app.js b/app/reducers/app.js
index 2cb62c509..61687c21e 100644
--- a/app/reducers/app.js
+++ b/app/reducers/app.js
@@ -1267,23 +1267,20 @@ function prepareDirectoryContent(
dispatch(actions.showNotification(i18n.t('core:generatingThumbnailsFailed'), 'warning', true));
}
+ dispatch(actions.setGeneratingThumbnails(false));
if (tmbGenerationPromises.length > 0) {
dispatch(actions.setGeneratingThumbnails(true));
// dispatch(actions.showNotification(i18n.t('core:checkingThumbnails'), 'info', false));
Promise.all(tmbGenerationPromises)
.then(handleTmbGenerationResults)
.catch(handleTmbGenerationFailed);
- } else if (tmbGenerationList.length > 0) {
+ }
+ if (tmbGenerationList.length > 0) {
dispatch(actions.setGeneratingThumbnails(true));
// dispatch(actions.showNotification(i18n.t('core:loadingOrGeneratingThumbnails'), 'info', false));
PlatformIO.createThumbnailsInWorker(tmbGenerationList)
.then(handleTmbGenerationResults)
.catch(handleTmbGenerationFailed);
- } else { // no dirEntries
- console.log('Dir ' + directoryPath + ' contains ' + directoryContent.length);
- dispatch(actions.setGeneratingThumbnails(false));
- dispatch(actions.loadDirectorySuccess(directoryPath, directoryContent));
- return;
}
console.log('Dir ' + directoryPath + ' contains ' + directoryContent.length);