File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -24,15 +24,11 @@ public class Updater
2424 {
2525 private readonly IPublicAPI API ;
2626
27- public string GitHubRepository { get ; set ; }
27+ public string GitHubRepository { get ; init ; }
2828
29- public Updater ( IPublicAPI publicAPI )
29+ public Updater ( IPublicAPI publicAPI , string gitHubRepository )
3030 {
3131 API = publicAPI ;
32- }
33-
34- public void Initialize ( string gitHubRepository )
35- {
3632 GitHubRepository = gitHubRepository ;
3733 }
3834
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 ( sp => new Updater ( sp . GetRequiredService < IPublicAPI > ( ) ) )
48+ . AddSingleton ( sp => new Updater ( sp . GetRequiredService < IPublicAPI > ( ) , Launcher . Properties . Settings . Default . GithubRepo ) )
4949 . AddSingleton < Portable > ( )
5050 . AddSingleton < SettingWindowViewModel > ( )
5151 . AddSingleton < IAlphabet , PinyinAlphabet > ( )
@@ -79,8 +79,6 @@ private async void OnStartupAsync(object sender, StartupEventArgs e)
7979 {
8080 await Stopwatch . NormalAsync ( "|App.OnStartup|Startup cost" , async ( ) =>
8181 {
82- Ioc . Default . GetRequiredService < Updater > ( ) . Initialize ( Launcher . Properties . Settings . Default . GithubRepo ) ;
83-
8482 Ioc . Default . GetRequiredService < Portable > ( ) . PreStartCleanUpAfterPortabilityUpdate ( ) ;
8583
8684 Log . Info ( "|App.OnStartup|Begin Flow Launcher startup ----------------------------------------------------" ) ;
You can’t perform that action at this time.
0 commit comments