update async funcs

This commit is contained in:
Mylloon 2023-08-01 11:10:35 +02:00
parent fb30b57d3b
commit 465ad3ca03
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -36,7 +36,7 @@ app.whenReady().then(() => {
const win = createWindow(); const win = createWindow();
/** Ask user a file */ /** Ask user a file */
const askFile = async () => { const askFile = () => {
return dialog.showOpenDialogSync(win, { return dialog.showOpenDialogSync(win, {
filters: [moviesFilter], filters: [moviesFilter],
properties: ["openFile", "dontAddToRecent"], properties: ["openFile", "dontAddToRecent"],
@ -45,7 +45,7 @@ app.whenReady().then(() => {
/** Send confirmation to user */ /** Send confirmation to user */
const confirmation = async (message: string) => { const confirmation = async (message: string) => {
dialog.showMessageBoxSync(win, { message }); await dialog.showMessageBox(win, { message });
}; };
/** Merge all audios track of a video into one */ /** Merge all audios track of a video into one */
@ -109,6 +109,6 @@ app.whenReady().then(() => {
ipcMain.handle("reduceSize", (_, file: string, bitrate: number) => ipcMain.handle("reduceSize", (_, file: string, bitrate: number) =>
reduceSize(file, bitrate) reduceSize(file, bitrate)
); );
ipcMain.handle("exit", async () => app.quit()); ipcMain.handle("exit", () => app.quit());
ipcMain.handle("confirmation", async (_, text: string) => confirmation(text)); ipcMain.handle("confirmation", (_, text: string) => confirmation(text));
}); });