fix: don't close renderer process on darwin
Signed-off-by: Innei <i@innei.in>
This commit is contained in:
parent
f2b6a2f50b
commit
707bf01f59
|
|
@ -55,6 +55,8 @@ function bootsharp() {
|
|||
if (BrowserWindow.getAllWindows().length === 0) {
|
||||
mainWindow = createMainWindow()
|
||||
}
|
||||
|
||||
if (mainWindow) mainWindow.show()
|
||||
})
|
||||
|
||||
app.on("open-url", (_, url) => {
|
||||
|
|
@ -140,6 +142,11 @@ function bootsharp() {
|
|||
app.quit()
|
||||
}
|
||||
})
|
||||
|
||||
app.on("before-quit", () => {
|
||||
const windows = BrowserWindow.getAllWindows()
|
||||
windows.forEach((window) => window.destroy())
|
||||
})
|
||||
}
|
||||
|
||||
bootsharp()
|
||||
|
|
|
|||
|
|
@ -136,6 +136,14 @@ export const createMainWindow = () => {
|
|||
})
|
||||
|
||||
windows.mainWindow = window
|
||||
|
||||
window.on("close", (event) => {
|
||||
if (process.platform === "darwin") {
|
||||
event.preventDefault()
|
||||
window.hide()
|
||||
}
|
||||
})
|
||||
|
||||
return window
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ function FeedCategoryImpl({
|
|||
</span>
|
||||
</div>
|
||||
{!!unread && showUnreadCount && (
|
||||
<div className="ml-2 text-xs text-zinc-500 dark:text-neutral-400">
|
||||
<div className="ml-2 text-xs tabular-nums text-zinc-500 dark:text-neutral-400">
|
||||
{unread}
|
||||
</div>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue