diff --git a/sticker-creator/index.html b/sticker-creator/index.html index 0e204b2671..76eb698ab0 100644 --- a/sticker-creator/index.html +++ b/sticker-creator/index.html @@ -12,9 +12,9 @@ - - - - + + + + diff --git a/sticker-creator/preload.js b/sticker-creator/preload.js index 95e964ca8e..f085727bdb 100644 --- a/sticker-creator/preload.js +++ b/sticker-creator/preload.js @@ -180,7 +180,7 @@ window.encryptAndUpload = async ( cover, onProgress = noop ) => { - window.sqlInitializer.goBackToMainProcess(); + await window.sqlInitializer.goBackToMainProcess(); const usernameItem = await window.Signal.Data.getItemById('uuid_id'); const oldUsernameItem = await window.Signal.Data.getItemById('number_id'); const passwordItem = await window.Signal.Data.getItemById('password'); diff --git a/ts/sql/Interface.ts b/ts/sql/Interface.ts index 9e8569b474..54363a374d 100644 --- a/ts/sql/Interface.ts +++ b/ts/sql/Interface.ts @@ -585,7 +585,7 @@ export type ClientInterface = DataInterface & { // These are defined on the server-only and used in the client to determine // whether we should use IPC to use the database in the main process or // use the db already running in the renderer. - goBackToMainProcess: () => void; + goBackToMainProcess: () => Promise; }; export type ClientJobType = { diff --git a/ts/sql/initialize.ts b/ts/sql/initialize.ts index 47bb408800..e14275a021 100644 --- a/ts/sql/initialize.ts +++ b/ts/sql/initialize.ts @@ -26,6 +26,6 @@ export async function initialize(isTesting = false): Promise { await sql.initializeRenderer({ configDir, key }); } -export function goBackToMainProcess(): void { - window.Signal.Data.goBackToMainProcess(); +export async function goBackToMainProcess(): Promise { + return window.Signal.Data.goBackToMainProcess(); } diff --git a/ts/window.d.ts b/ts/window.d.ts index 7601d10271..18d043ed2c 100644 --- a/ts/window.d.ts +++ b/ts/window.d.ts @@ -263,7 +263,7 @@ declare global { updateTrayIcon: (count: number) => void; sqlInitializer: { initialize: () => Promise; - goBackToMainProcess: () => void; + goBackToMainProcess: () => Promise; }; Backbone: typeof Backbone;