TagSpaces is an offline, open source, document manager with tagging support
quick fix for the search results
uggrock91e354e273be
diff --git a/data/js/perspective.manager.js b/data/js/perspective.manager.jsindex cfb9c3b99..06117bcb5 100644--- a/data/js/perspective.manager.js+++ b/data/js/perspective.manager.js@@ -196,11 +196,13 @@ define(function(require, exports, module) {}};- var updateFileBrowserData = function(dirList) {+ var updateFileBrowserData = function(dirList, isSearchResult) {console.log('Updating the file browser data...');TSCORE.fileList = [];TSCORE.showLoadingAnimation();- TSCORE.showWaitingDialog("Loading metadata and generating thumbnails");+ if(!isSearchResult) { // TODO tmp solution for not hiding the loading dialog on search+ TSCORE.showWaitingDialog("Loading metadata and thumbnails");+ }var metaDataLoadingPromises = [];var tags, ext, title, fileSize, fileLMDT, path, filename, entry, thumbPath, metaObj;@@ -251,7 +253,9 @@ define(function(require, exports, module) {];TSCORE.fileList.push(entry);metaDataLoadingPromises.push(TSCORE.Meta.loadMetaFileJsonPromise(entry));- metaDataLoadingPromises.push(TSCORE.Meta.loadThumbnailPromise(entry));+ if(!isSearchResult) {+ metaDataLoadingPromises.push(TSCORE.Meta.loadThumbnailPromise(entry));+ }} else {entry = [path,@@ -266,7 +270,7 @@ define(function(require, exports, module) {TSCORE.hideLoadingAnimation();TSCORE.hideWaitingDialog();changePerspective(TSCORE.currentPerspectiveID);- if (TSCORE.PRO) { // TODO add check for setting enabling text extraction+ if (TSCORE.PRO && !isSearchResult) { // TODO add check for setting enabling text extractionTSCORE.showLoadingAnimation();//TSCORE.showWaitingDialog("Extracting text content");TSCORE.PRO.extractTextContentFromFilesPromise(TSCORE.fileList).then(function() {diff --git a/data/js/search.js b/data/js/search.jsindex 4b22f4a5b..e4b60b8b2 100644--- a/data/js/search.js+++ b/data/js/search.js@@ -209,7 +209,7 @@ define(function(require, exports, module) {console.timeEnd("walkDirectorySearch");console.log("Found " + searchResults.length + " out of " + entries.length + " entries.");TSCORE.Search.nextQuery = "";- TSCORE.PerspectiveManager.updateFileBrowserData(searchResults);+ TSCORE.PerspectiveManager.updateFileBrowserData(searchResults, true);TSCORE.hideWaitingDialog();},function(err) {