File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,15 @@ namespace Flow.Launcher.Core
2323{ 
2424    public  class  Updater 
2525    { 
26-         private  readonly  IPublicAPI  API   =   Ioc . Default . GetRequiredService < IPublicAPI > ( ) ; 
26+         private  readonly  IPublicAPI  API ; 
2727
2828        public  string  GitHubRepository  {  get ;  set ;  } 
2929
30+         public  Updater ( IPublicAPI  publicAPI ) 
31+         { 
32+             API  =  publicAPI ; 
33+         } 
34+ 
3035        public  void  Initialize ( string  gitHubRepository ) 
3136        { 
3237            GitHubRepository  =  gitHubRepository ; 
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public App()
4545                . UseContentRoot ( AppContext . BaseDirectory ) 
4646                . ConfigureServices ( services =>  services 
4747                    . AddSingleton ( _ =>  _settings ) 
48-                     . AddSingleton < Updater > ( ) 
48+                     . AddSingleton ( sp  =>   new   Updater ( sp . GetRequiredService < IPublicAPI > ( ) ) ) 
4949                    . AddSingleton < Portable > ( ) 
5050                    . AddSingleton < SettingWindowViewModel > ( ) 
5151                    . AddSingleton < IAlphabet ,  PinyinAlphabet > ( ) 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments