fix mac import data

This commit is contained in:
Bruce Liu 2020-07-01 13:38:10 +08:00
parent b053c9ce10
commit 0848e8767d

View File

@ -4,6 +4,7 @@ import { store } from "./main/settings"
import performUpdate from "./main/update-scripts" import performUpdate from "./main/update-scripts"
import { WindowManager } from "./main/window" import { WindowManager } from "./main/window"
import { openExternal } from "./main/utils" import { openExternal } from "./main/utils"
import Time from "./components/utils/time"
if (!process.mas) { if (!process.mas) {
const locked = app.requestSingleInstanceLock() const locked = app.requestSingleInstanceLock()
@ -70,7 +71,9 @@ ipcMain.handle("import-all-settings", (_, configs: SchemaTypes) => {
} }
performUpdate(store) performUpdate(store)
nativeTheme.themeSource = store.get("theme", ThemeSettings.Default) 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) => { app.on("web-contents-created", (_, contents) => {