@@ -20,6 +20,12 @@ class AutostartManager {
2020 this . flatpakPortalManager = new FlatpakPortalManager ( settings )
2121 } else if ( this . platform === 'linux' ) {
2222 this . nativeAutoLauncher = new AutoLaunch ( { name : 'stretchly' } )
23+ } else if ( this . platform === 'win32' && this . windowsStore ) {
24+ this . windowsStoreAutoLauncher = new AutoLaunch ( {
25+ name : 'Stretchly' ,
26+ path : '33881JanHovancik.stretchly_24fg4m0zq65je!Stretchly' ,
27+ isHidden : true
28+ } )
2329 }
2430 }
2531
@@ -31,7 +37,7 @@ class AutostartManager {
3137 } else if ( this . platform === 'linux' ) {
3238 await ( value ? this . nativeAutoLauncher . enable ( ) : this . nativeAutoLauncher . disable ( ) )
3339 } else if ( this . platform === 'win32' && this . windowsStore ) {
34- await ( value ? this . _windowsStoreAutoLaunch . enable ( ) : this . _windowsStoreAutoLaunch . disable ( ) )
40+ await ( value ? this . windowsStoreAutoLauncher . enable ( ) : this . windowsStoreAutoLauncher . disable ( ) )
3541 } else {
3642 this . app . setLoginItemSettings ( { openAtLogin : value } )
3743 }
@@ -43,21 +49,12 @@ class AutostartManager {
4349 } else if ( this . platform === 'linux' ) {
4450 return await this . nativeAutoLauncher . isEnabled ( )
4551 } else if ( this . platform === 'win32' && this . windowsStore ) {
46- return await this . _windowsStoreAutoLaunch . isEnabled ( )
52+ return await this . windowsStoreAutoLauncher . isEnabled ( )
4753 } else {
48- return await this . app . getLoginItemSettings ( ) . openAtLogin
54+ return this . app . getLoginItemSettings ( ) . openAtLogin
4955 }
5056 }
5157
52- get _windowsStoreAutoLaunch ( ) {
53- const stretchlyAutoLaunch = new AutoLaunch ( {
54- name : 'Stretchly' ,
55- path : '33881JanHovancik.stretchly_24fg4m0zq65je!Stretchly' ,
56- isHidden : true
57- } )
58- return stretchlyAutoLaunch
59- }
60-
6158 disconnect ( ) {
6259 if ( this . flatpakPortalManager ) {
6360 this . flatpakPortalManager . disconnect ( )
0 commit comments