From 3a503151a4825108e0f9789bb32402a110436af9 Mon Sep 17 00:00:00 2001 From: PiEgg Date: Sun, 16 Jan 2022 20:22:23 +0800 Subject: [PATCH] :bug: Fix: notification freeze the main-process after uploading with clipboard ISSUES CLOSED: #824 --- src/main/apis/app/uploader/apis.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/apis/app/uploader/apis.ts b/src/main/apis/app/uploader/apis.ts index 01fe89348..dcce9d7d6 100644 --- a/src/main/apis/app/uploader/apis.ts +++ b/src/main/apis/app/uploader/apis.ts @@ -23,7 +23,9 @@ export const uploadClipboardFiles = async (): Promise => { body: img[0].imgUrl!, icon: img[0].imgUrl }) - notification.show() + setTimeout(() => { + notification.show() + }, 100) await GalleryDB.getInstance().insert(img[0]) // trayWindow just be created in mac/windows, not in linux trayWindow?.webContents?.send('clipboardFiles', [])