From e8dfdebeee154bfc33cde5f0f7502b226d6af718 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 5 Mar 2025 12:48:06 +0100 Subject: [PATCH] Fix file app not able to load the account --- src/worker/async-store.js | 18 ++++++++++++++++++ www/file/main.js | 1 + 2 files changed, 19 insertions(+) diff --git a/src/worker/async-store.js b/src/worker/async-store.js index 2d94181cd..40355d419 100644 --- a/src/worker/async-store.js +++ b/src/worker/async-store.js @@ -3270,6 +3270,24 @@ const factory = (ApiConfig = {}, Sortify, UserObject, ProxyManager, onPadRejectedEvt.reg(next); }); } + if (requires === 'file') { + // Start with only the pad modules, callback + // and then load the account and other modules + return void onNoDrive(clientId, function (obj) { + if (obj && obj.error) { + // handle error + return; // XXX + } + // Callback now to unfreeze the loading screen + // Pad can now start to be loaded + cb(obj); + loadDrive(clientId, data, ret => { + startCacheModules(clientId, ret, onInit); + }, ret => { + startModules(clientId, ret, onInit); + }); + }); + } if (requires === 'team') { const initTeams = Util.once(ret => { diff --git a/www/file/main.js b/www/file/main.js index 711f6d8c1..ab5783039 100644 --- a/www/file/main.js +++ b/www/file/main.js @@ -27,6 +27,7 @@ define([ noDrive: true, hash: hash, href: href, + requires: 'file', noRealtime: true, addData: addData });