@@ -598,17 +598,11 @@ private async void StartupRoutine(bool bInvalidate = false)
598598
599599 if ( tempFolder . Exists ( ) )
600600 {
601- // This is to cleanup anything left over by the auto updator/dropper file .
601+ // This is to cleanup anything left over by the auto updator/dropper program .
602602 Directory . Delete ( tempFolder . GetPath ( ) , true ) ;
603603 }
604604
605- if ( bInvalidate )
606- {
607- Storage . Invalidate ( true ) ;
608- Retrievers . Invalidate ( ) ;
609- }
610-
611- if ( ! Storage . GetModulePath ( ) . Exists ( ) )
605+ if ( ! Storage . HasCoderedRegistry ( ) || ! Storage . GetModulePath ( ) . Exists ( ) )
612606 {
613607 if ( await Retrievers . CheckInitialized ( ) )
614608 {
@@ -618,60 +612,55 @@ private async void StartupRoutine(bool bInvalidate = false)
618612 {
619613 InstallOfflinePopupCtrl . Show ( ) ;
620614 }
615+
616+ return ;
621617 }
622- else
618+
619+ if ( bInvalidate )
623620 {
624- Logger . CheckInitialized ( ) ; // Create and initialize the log file for the launcher.
621+ Storage . Invalidate ( true ) ;
622+ Retrievers . Invalidate ( ) ;
623+ }
625624
626- if ( Configuration . CheckInitialized ( ) )
625+ Logger . CheckInitialized ( ) ; // Create and initialize the log file for the launcher.
626+
627+ if ( Configuration . CheckInitialized ( ) )
628+ {
629+ if ( Configuration . ShouldMinimizeOnStartup ( ) )
627630 {
628- if ( Configuration . ShouldMinimizeOnStartup ( ) )
629- {
630- TitleBar_OnMinimized ( null , null ) ;
631- }
631+ TitleBar_OnMinimized ( null , null ) ;
632+ }
632633
633- if ( await Retrievers . CheckInitialized ( ) )
634- {
635- string pingUrl = await Retrievers . GetModuleUrl ( ) ;
634+ if ( await Retrievers . CheckInitialized ( ) )
635+ {
636+ string pingUrl = await Retrievers . GetModuleUrl ( ) ;
636637
637- if ( ( await Downloaders . WebsiteOnline ( pingUrl ) ) == false )
638- {
639- OfflinePopupCtrl . Show ( ) ;
640- }
641- else
642- {
643- ContinueStartup ( ) ;
644- }
638+ if ( ( await Downloaders . WebsiteOnline ( pingUrl ) ) == false )
639+ {
640+ OfflinePopupCtrl . Show ( ) ;
645641 }
646642 else
647643 {
648- OfflinePopupCtrl . Show ( ) ;
644+ ContinueStartup ( ) ;
649645 }
646+ }
647+ else
648+ {
649+ OfflinePopupCtrl . Show ( ) ;
650+ }
650651
651- NewsCtrl . ParseArticles ( await Retrievers . GetNewsUrl ( ) ) ;
652+ NewsCtrl . ParseArticles ( await Retrievers . GetNewsUrl ( ) ) ;
653+ }
654+ else
655+ {
656+ if ( ! Storage . GetLibraryFile ( ) . Exists ( ) )
657+ {
658+ await Installer . DownloadModule ( ) ;
659+ StartupRoutine ( true ) ;
652660 }
653661 else
654662 {
655- if ( ! Storage . GetModulePath ( ) . Exists ( ) )
656- {
657- if ( await Retrievers . CheckInitialized ( ) )
658- {
659- InstallPopupCtrl . Show ( ) ;
660- }
661- else
662- {
663- InstallOfflinePopupCtrl . Show ( ) ;
664- }
665- }
666- else if ( ! Storage . GetLibraryFile ( ) . Exists ( ) )
667- {
668- await Installer . DownloadModule ( ) ;
669- StartupRoutine ( true ) ;
670- }
671- else
672- {
673- ContinueStartup ( ) ;
674- }
663+ ContinueStartup ( ) ;
675664 }
676665 }
677666
0 commit comments