TagSpaces is an offline, open source, document manager with tagging support
speeding up showing the worker window for PDFs
Ilian Sapundshiev713f0ceeb0fe
diff --git a/app/splash-worker.js b/app/splash-worker.jsindex 70f24729d..917f59a43 100644--- a/app/splash-worker.js+++ b/app/splash-worker.js@@ -88,17 +88,17 @@ function init() {}isGeneratingThumbs = true;const tmbGenerationPromises = [];- let showSplash = false;+ let splashShown = false;arg.tmbGenerationList.map(entry => {- showSplash = entry.endsWith('pdf');+ if (!splashShown && entry.endsWith('pdf')) {+ splashShown = true;+ ipcRenderer.send('setSplashVisibility', {+ visibility: true,+ });+ }tmbGenerationPromises.push(getThumbnailURLPromise(entry));return true;});- if (showSplash) {- ipcRenderer.send('setSplashVisibility', {- visibility: true,- });- }Promise.all(tmbGenerationPromises).then(tmbResult => {console.log('tmb results' + JSON.stringify(tmbResult));ipcRenderer.send('setSplashVisibility', {