mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Run SQL initialize in parallel with createWindow
This commit is contained in:
committed by
Josh Perez
parent
af9e038add
commit
207d05fd05
@@ -8,7 +8,18 @@ import sql from './Server';
|
||||
|
||||
const getRealPath = pify(fs.realpath);
|
||||
|
||||
export async function initialize(): Promise<void> {
|
||||
// Called from renderer.
|
||||
export async function initialize(isTesting = false): Promise<void> {
|
||||
if (!isTesting) {
|
||||
ipc.send('database-ready');
|
||||
|
||||
await new Promise<void>(resolve => {
|
||||
ipc.once('database-ready', () => {
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
const configDir = await getRealPath(ipc.sendSync('get-user-data-path'));
|
||||
const key = ipc.sendSync('user-config-key');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user