fix(sql-library): load saved files earlier at startup
This commit is contained in:
5 files changed
+63
-16
No files matched your search
@@ -3870,6 +3870,15 @@ function onLoginSuccess() {
|
||||
async function initApp() {
|
||||
const t0 = performance.now();
|
||||
console.log("[STARTUP] initApp begin");
|
||||
void Promise.all([initSavedSqlEditorPositions(), savedSqlStore.initFromStorage()])
|
||||
.then(() => {
|
||||
console.log(`[STARTUP] savedSqlStore.initFromStorage: ${(performance.now() - t0).toFixed(0)}ms`);
|
||||
void queryStore.hydrateSavedSqlTabs();
|
||||
})
|
||||
.catch((e: any) => {
|
||||
toast(t("connection.loadFailed", { message: e?.message || String(e) }), 5000);
|
||||
});
|
||||
|
||||
const restoreOpenTabs = async () => {
|
||||
await settingsStore.initEditorSettings();
|
||||
markStartupPhase("settings-ready");
|
||||
@@ -3916,15 +3925,6 @@ async function initApp() {
|
||||
|
||||
void promptTemplateStore.init();
|
||||
|
||||
void Promise.all([initSavedSqlEditorPositions(), savedSqlStore.initFromStorage()])
|
||||
.then(() => {
|
||||
console.log(`[STARTUP] savedSqlStore.initFromStorage: ${(performance.now() - t0).toFixed(0)}ms`);
|
||||
void queryStore.hydrateSavedSqlTabs();
|
||||
})
|
||||
.catch((e: any) => {
|
||||
toast(t("connection.loadFailed", { message: e?.message || String(e) }), 5000);
|
||||
});
|
||||
|
||||
restoreActiveConnectionContext();
|
||||
} catch (e: any) {
|
||||
toast(t("connection.loadFailed", { message: e?.message || String(e) }), 5000);
|
||||
|
||||
Reference in new issue
Block a user