@@ -49,20 +49,7 @@ export class AppService {
4949 * @param target - The target platform ("darwin" for macOS, "linux" for Linux, or "windows" for Windows)
5050 * @returns true if server version is greater than client version, false otherwise
5151 */
52- isVersionGreater ( clientVersion : string , target : string ) {
53- let serverVersion ;
54-
55- // Get the appropriate server version based on the target platform
56- if ( target === "darwin" ) {
57- serverVersion = this . config . get ( "updater.appMacVersion" ) ;
58- }
59- else if ( target === "linux" ) {
60- serverVersion = this . config . get ( "updater.appLinuxVersion" ) ;
61- }
62- else {
63- // Default to Windows version for any other target
64- serverVersion = this . config . get ( "updater.appVersion" ) ;
65- }
52+ isVersionGreater ( serverVersion : string , clientVersion : string , target : string ) {
6653
6754 // Only proceed if both versions are available
6855 if ( serverVersion && clientVersion ) {
@@ -87,15 +74,28 @@ export class AppService {
8774 }
8875
8976 getUpdaterDetails ( currentVersion : string , target : string ) : UpdaterJsonResponsePayload {
77+ let serverVersion ;
78+ // Get the appropriate server version based on the target platform
79+ if ( target === "darwin" ) {
80+ serverVersion = this . config . get ( "updater.appMacVersion" ) ;
81+ }
82+ else if ( target === "linux" ) {
83+ serverVersion = this . config . get ( "updater.appLinuxVersion" ) ;
84+ }
85+ else {
86+ // Default to Windows version for any other target
87+ serverVersion = this . config . get ( "updater.appVersion" ) ;
88+ }
9089 if (
9190 this . config . get ( "updater.updateAvailable" ) === "true" &&
9291 this . isVersionGreater (
92+ serverVersion ,
9393 currentVersion ,
9494 target
9595 )
9696 ) {
9797 const updatorJson = {
98- version : this . config . get ( "updater.appVersion" ) ,
98+ version : serverVersion ,
9999 platforms : {
100100 "windows-x86_64" : {
101101 signature : this . config . get ( "updater.windows.appSignature" ) ,
0 commit comments