TagSpaces is an offline, open source, document manager with tagging support
adjustments for the listDirectoryPromise method
uggrock5b192d0d4056
diff --git a/data/js/directories.ui.js b/data/js/directories.ui.jsindex 3518e6fab..8a302c604 100644--- a/data/js/directories.ui.js+++ b/data/js/directories.ui.js@@ -433,7 +433,7 @@ define(function(require, exports, module) {}function listDirectory(dirPath) {- //TSCORE.IO.listDirectory(dirPath);+ TSCORE.showLoadingAnimation();TSCORE.IO.listDirectoryPromise(dirPath).then(function(entries) {TSPOSTIO.listDirectory(entries);@@ -445,8 +445,8 @@ define(function(require, exports, module) {});- if (TSCORE.PRO) {- TSCORE.IO.createMetaFolder(dirPath);+ if (TSCORE.PRO) { // TODO add additional check if the creation of meta folders is enabled+ TSCORE.IO.createMetaFolder(dirPath); // TODO use createDirectoryPromise}}diff --git a/data/js/perspective.manager.js b/data/js/perspective.manager.jsindex ac61f2a15..39cc9c14d 100644--- a/data/js/perspective.manager.js+++ b/data/js/perspective.manager.js@@ -246,7 +246,16 @@ define(function(require, exports, module) {var refreshFileListContainer = function() {// TODO consider search view- TSCORE.IO.listDirectory(TSCORE.currentPath);+ //TSCORE.showLoadingAnimation();+ TSCORE.IO.listDirectoryPromise(TSCORE.currentPath).then(+ function(entries) {+ TSPOSTIO.listDirectory(entries);+ },+ function(err) {+ TSPOSTIO.errorOpeningPath();+ console.warn("Error listing directory" + err);+ }+ );};var hideAllPerspectives = function() {diff --git a/data/js/postioapi.js b/data/js/postioapi.jsindex 9fcb48092..2eb631eb7 100644--- a/data/js/postioapi.js+++ b/data/js/postioapi.js@@ -92,6 +92,7 @@ define(function(require, exports, module) {};exports.listDirectory = function(anotatedDirList) {+ TSCORE.hideLoadingAnimation();TSCORE.PerspectiveManager.updateFileBrowserData(anotatedDirList);TSCORE.updateSubDirs(anotatedDirList);};