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
23
23
{
24
24
public class Updater
25
25
{
26
- private readonly IPublicAPI API = Ioc . Default . GetRequiredService < IPublicAPI > ( ) ;
26
+ private readonly IPublicAPI API ;
27
27
28
28
public string GitHubRepository { get ; set ; }
29
29
30
+ public Updater ( IPublicAPI publicAPI )
31
+ {
32
+ API = publicAPI ;
33
+ }
34
+
30
35
public void Initialize ( string gitHubRepository )
31
36
{
32
37
GitHubRepository = gitHubRepository ;
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public App()
45
45
. UseContentRoot ( AppContext . BaseDirectory )
46
46
. ConfigureServices ( services => services
47
47
. AddSingleton ( _ => _settings )
48
- . AddSingleton < Updater > ( )
48
+ . AddSingleton ( sp => new Updater ( sp . GetRequiredService < IPublicAPI > ( ) ) )
49
49
. AddSingleton < Portable > ( )
50
50
. AddSingleton < SettingWindowViewModel > ( )
51
51
. AddSingleton < IAlphabet , PinyinAlphabet > ( )
You can’t perform that action at this time.
0 commit comments