Delay initializing SQL in renderer
This commit is contained in:
parent
0d5ef38e52
commit
8cf6748dce
10 changed files with 101 additions and 104 deletions
|
@ -154,13 +154,6 @@ export async function startApp(): Promise<void> {
|
|||
storage: window.storage,
|
||||
});
|
||||
window.attachmentDownloadQueue = [];
|
||||
try {
|
||||
log.info('Initializing SQL in renderer');
|
||||
await window.sqlInitializer.initialize();
|
||||
log.info('SQL initialized in renderer');
|
||||
} catch (err) {
|
||||
log.error('SQL failed to initialize', err && err.stack ? err.stack : err);
|
||||
}
|
||||
|
||||
await window.Signal.Util.initializeMessageCounter();
|
||||
|
||||
|
@ -803,6 +796,12 @@ export async function startApp(): Promise<void> {
|
|||
window.Signal.Data.ensureFilePermissions();
|
||||
}
|
||||
|
||||
try {
|
||||
await window.Signal.Data.startInRendererProcess();
|
||||
} catch (err) {
|
||||
log.error('SQL failed to initialize', err && err.stack ? err.stack : err);
|
||||
}
|
||||
|
||||
Views.Initialization.setMessage(window.i18n('loading'));
|
||||
|
||||
idleDetector = new IdleDetector();
|
||||
|
@ -2335,7 +2334,7 @@ export async function startApp(): Promise<void> {
|
|||
);
|
||||
|
||||
// Go back to main process before processing delayed actions
|
||||
await window.sqlInitializer.goBackToMainProcess();
|
||||
await window.Signal.Data.goBackToMainProcess();
|
||||
|
||||
profileKeyResponseQueue.start();
|
||||
lightSessionResetQueue.start();
|
||||
|
@ -3441,7 +3440,7 @@ export async function startApp(): Promise<void> {
|
|||
|
||||
// If we couldn't connect during startup - we should still switch SQL to
|
||||
// the main process to avoid stalling UI.
|
||||
window.sqlInitializer.goBackToMainProcess();
|
||||
window.Signal.Data.goBackToMainProcess();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue