From 0848e8767dd19e410e7a14d40bb46585d9247b03 Mon Sep 17 00:00:00 2001 From: Bruce Liu Date: Wed, 1 Jul 2020 13:38:10 +0800 Subject: [PATCH] fix mac import data --- src/electron.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/electron.ts b/src/electron.ts index 8fdedd5..ca430b5 100644 --- a/src/electron.ts +++ b/src/electron.ts @@ -4,6 +4,7 @@ import { store } from "./main/settings" import performUpdate from "./main/update-scripts" import { WindowManager } from "./main/window" import { openExternal } from "./main/utils" +import Time from "./components/utils/time" if (!process.mas) { const locked = app.requestSingleInstanceLock() @@ -70,7 +71,9 @@ ipcMain.handle("import-all-settings", (_, configs: SchemaTypes) => { } performUpdate(store) nativeTheme.themeSource = store.get("theme", ThemeSettings.Default) - winManager.mainWindow.close() + setTimeout(() => { + winManager.mainWindow.close() + }, process.platform === "darwin" ? 1000 : 0); // Why ??? }) app.on("web-contents-created", (_, contents) => {