mirror of
https://github.com/heyman/heynote.git
synced 2025-08-19 02:46:24 +02:00
Improve auto update
Add titles to status bar buttons Bump version to 1.0.7
This commit is contained in:
@@ -65,11 +65,12 @@ ipcMain.handle(UPDATE_INSTALL_AND_RESTART, () => {
|
||||
|
||||
ipcMain.handle(UPDATE_CHECK_FOR_UPDATES, () => {
|
||||
autoUpdater.checkForUpdates()
|
||||
// for development, the autoUpdater will not work, so we need to trigger the event manually
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
window?.webContents.send(UPDATE_NOT_AVAILABLE_EVENT)
|
||||
}
|
||||
})
|
||||
|
||||
export function checkForUpdates(win) {
|
||||
export function initializeAutoUpdate(win) {
|
||||
window = win
|
||||
|
||||
// check for updates
|
||||
autoUpdater.checkForUpdates()
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ import { WINDOW_CLOSE_EVENT, SETTINGS_CHANGE_EVENT } from '../constants';
|
||||
import CONFIG from "../config"
|
||||
import { onBeforeInputEvent } from "../keymap"
|
||||
import { isMac } from '../detect-platform';
|
||||
import { checkForUpdates } from './auto-update';
|
||||
import { initializeAutoUpdate } from './auto-update';
|
||||
|
||||
|
||||
// The built directory structure
|
||||
@@ -138,7 +138,7 @@ async function createWindow() {
|
||||
}
|
||||
|
||||
app.whenReady().then(createWindow).then(async () => {
|
||||
checkForUpdates(win)
|
||||
initializeAutoUpdate(win)
|
||||
})
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
|
Reference in New Issue
Block a user