@@ -12,7 +12,7 @@ import { MonitoringManager } from "../helpers/monitoring-manager";
12
12
import { PropertiesManager } from "../helpers/properties-manager" ;
13
13
import { SettingsManager } from "../helpers/settings-manager" ;
14
14
import { WindowInfo } from "@miniben90/x-win" ;
15
- import { updateElectronApp } from "update- electron-app " ;
15
+ import { autoUpdater } from "electron-updater " ;
16
16
17
17
export class Wakatime {
18
18
private lastEntitiy = "" ;
@@ -36,15 +36,20 @@ export class Wakatime {
36
36
this . tray = tray ;
37
37
38
38
if ( PropertiesManager . autoUpdateEnabled ) {
39
- updateElectronApp ( {
40
- logger : {
41
- log : ( message ) => Logging . instance ( ) . log ( message , LogLevel . DEBUG ) ,
42
- error : ( message ) => Logging . instance ( ) . log ( message , LogLevel . ERROR ) ,
43
- info : ( message ) => Logging . instance ( ) . log ( message , LogLevel . INFO ) ,
44
- warn : ( message ) => Logging . instance ( ) . log ( message , LogLevel . WARN ) ,
45
- } ,
46
- updateInterval : "10 minutes" ,
39
+ autoUpdater . checkForUpdatesAndNotify ( ) ;
40
+ /*
41
+ autoUpdater.on("update-available", () => {
42
+ console.log("Update available");
47
43
});
44
+
45
+ autoUpdater.on("update-downloaded", () => {
46
+ autoUpdater.quitAndInstall();
47
+ });
48
+
49
+ app.on("ready", () => {
50
+ autoUpdater.checkForUpdatesAndNotify();
51
+ });
52
+ */
48
53
}
49
54
50
55
if ( PropertiesManager . shouldLogToFile ) {
0 commit comments