File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -22,21 +22,20 @@ namespace Flow.Launcher.Core
22
22
{
23
23
public class Updater
24
24
{
25
+ public string GitHubReleaseRepository { get ; }
26
+ public string GitHubPrereleaseRepository { get ; }
27
+
25
28
public bool UpdateToPrerelease { get ; set ; }
26
-
27
- // TODO
28
- public const string ReleaseRepository = "https://github.com/Flow-Launcher/Flow.Launcher" ;
29
- public const string PrereleaseRepository = "https://github.com/Flow-Launcher/Prereleases" ;
30
-
31
- // TODO
32
- public string GitHubRepository => UpdateToPrerelease ? PrereleaseRepository : ReleaseRepository ;
29
+
30
+ public string GitHubRepository => UpdateToPrerelease ? GitHubPrereleaseRepository : GitHubReleaseRepository ;
33
31
34
32
private readonly IPublicAPI _api ;
35
33
36
- public Updater ( IPublicAPI publicAPI , string gitHubRepository )
34
+ public Updater ( IPublicAPI publicAPI , string gitHubReleaseRepository , string gitHubPrereleaseRepository )
37
35
{
38
36
_api = publicAPI ;
39
- GitHubRepository = gitHubRepository ;
37
+ GitHubReleaseRepository = gitHubReleaseRepository ;
38
+ GitHubPrereleaseRepository = gitHubPrereleaseRepository ;
40
39
}
41
40
42
41
private SemaphoreSlim UpdateLock { get ; } = new SemaphoreSlim ( 1 ) ;
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ public App()
55
55
. UseContentRoot ( AppContext . BaseDirectory )
56
56
. ConfigureServices ( services => services
57
57
. AddSingleton ( _ => _settings )
58
- . AddSingleton ( sp => new Updater ( sp . GetRequiredService < IPublicAPI > ( ) , Launcher . Properties . Settings . Default . GithubRepo ) )
58
+ . AddSingleton ( sp => new Updater ( sp . GetRequiredService < IPublicAPI > ( ) , Launcher . Properties . Settings . Default . GithubRepo , Launcher . Properties . Settings . Default . PrereleaseRepo ) )
59
59
. AddSingleton < Portable > ( )
60
60
. AddSingleton < SettingWindowViewModel > ( )
61
61
. AddSingleton < IAlphabet , PinyinAlphabet > ( )
You can’t perform that action at this time.
0 commit comments