Keep loading screen until drive is fully renderedw

This commit is contained in:
yflory 2022-10-26 17:10:13 +02:00
parent 1d062c98f2
commit 7eeb6bb165
1 changed files with 10 additions and 6 deletions

View File

@ -1152,10 +1152,10 @@ define([
var FILTER_BY = "filterBy";
var refresh = APP.refresh = function () {
var refresh = APP.refresh = function (cb) {
var type = APP.store[FILTER_BY];
var path = type ? [FILTER, type, currentPath] : currentPath;
APP.displayDirectory(path);
APP.displayDirectory(path, undefined, cb);
};
// `app`: true (force open wiht the app), false (force open in preview),
@ -4289,10 +4289,12 @@ define([
appStatus.ready(true);
};
var displayDirectory = APP.displayDirectory = function (path, force) {
var displayDirectory = APP.displayDirectory = function (path, force, cb) {
cb = cb || function () {};
if (APP.closed || (APP.$content && !$.contains(document.documentElement, APP.$content[0]))) { return; }
if (history.isHistoryMode) {
return void _displayDirectory(path, force);
_displayDirectory(path, force);
return void cb();
}
if (!manager.comparePath(currentPath, path)) {
removeSelected();
@ -4301,6 +4303,7 @@ define([
copyObjectValue(files, proxy.drive);
updateSharedFolders(sframeChan, manager, files, folders, function () {
_displayDirectory(path, force);
cb();
});
});
};
@ -5346,8 +5349,9 @@ define([
};
APP.FM = common.createFileManager(fmConfig);
refresh();
UI.removeLoadingScreen();
refresh(function () {
UI.removeLoadingScreen();
});
/*
if (!APP.team) {