@@ -11,6 +11,8 @@ public class VersionUpdataManager : Rcl.Services.VersionUpdataManager
1111
1212 private readonly IPopupServiceHelper _popupServiceHelper ;
1313
14+ private readonly IPlatformIntegration _platformIntegration ;
15+
1416 public VersionUpdataManager ( IDiaryService diaryService ,
1517 IResourceService resourceService ,
1618 ISettingService settingService ,
@@ -20,11 +22,13 @@ public VersionUpdataManager(IDiaryService diaryService,
2022 IDiaryFileManager diaryFileManager ,
2123 IAccessExternal accessExternal ,
2224 IPopupServiceHelper popupServiceHelper ,
23- IStaticWebAssets staticWebAssets ) :
25+ IStaticWebAssets staticWebAssets ,
26+ IPlatformIntegration platformIntegration ) :
2427 base ( diaryService , resourceService , settingService , mediaResourceManager , i18n , versionTracking , diaryFileManager , staticWebAssets )
2528 {
2629 _accessExternal = accessExternal ;
2730 _popupServiceHelper = popupServiceHelper ;
31+ _platformIntegration = platformIntegration ;
2832 }
2933
3034 protected override void InitializeVersionHandlers ( )
@@ -73,6 +77,25 @@ protected override async Task HandleVersionUpdate697()
7377
7478 public override async Task ToUpdate ( )
7579 {
80+ #if WINDOWS
81+ bool IsPackagedApp = false ;
82+ try
83+ {
84+ if ( Windows . ApplicationModel . Package . Current is not null )
85+ {
86+ IsPackagedApp = true ;
87+ }
88+ }
89+ catch
90+ {
91+ }
92+
93+ if ( ! IsPackagedApp )
94+ {
95+ await _platformIntegration . OpenBrowser ( "https://github.com/Yu-Core/SwashbucklerDiary/releases" ) ;
96+ return ;
97+ }
98+ #endif
7699 bool flag = await _accessExternal . OpenAppStoreAppDetails ( ) ;
77100 if ( ! flag )
78101 {
0 commit comments