4
4
using System . Threading . Tasks ;
5
5
using Windows . Storage ;
6
6
using CommunityToolkit . WinUI . Controls ;
7
- using Microsoft . UI . Dispatching ;
8
7
using Microsoft . UI . Xaml ;
9
8
using Octokit ;
10
9
using Page = Microsoft . UI . Xaml . Controls . Page ;
@@ -16,22 +15,17 @@ public partial class About : Page
16
15
private GitHubClient _githubClient = App . _githubClient ;
17
16
18
17
private readonly ApplicationDataContainer _localSettings = ApplicationData . Current . LocalSettings ;
19
- private string _appName ;
20
- private readonly string _appLatestVersion ;
18
+ private string _appName = Config . AppName ;
21
19
private string _appLatestVersionLink ;
22
20
private static readonly Services . UpdateManager _updateManager = App . UpdateManager ;
23
21
24
22
public About ( )
25
23
{
26
24
InitializeComponent ( ) ;
27
25
28
- System . Reflection . Assembly assembly = System . Reflection . Assembly . GetExecutingAssembly ( ) ;
29
- System . Diagnostics . FileVersionInfo fvi = System . Diagnostics . FileVersionInfo . GetVersionInfo ( assembly . Location ) ;
30
- _appName = assembly . GetName ( ) . Name ;
31
- _appLatestVersion = fvi . FileVersion ;
32
- _appLatestVersionLink = $ "https://github.com/{ Config . GitHubRepoOwner } /{ Config . GitHubRepoName } /releases/tag/{ _appLatestVersion } ";
26
+ _appLatestVersionLink = $ "https://github.com/{ Config . GitHubRepoOwner } /{ Config . GitHubRepoName } /releases/tag/{ Config . AppVersion } ";
33
27
34
- TextBlockVersionInfo . Text = $ "Current version: { _appLatestVersion } , TdLib { Config . TdLibVersion } ";
28
+ TextBlockVersionInfo . Text = $ "Current version: { Config . AppVersion } , TdLib { Config . TdLibVersion } ";
35
29
36
30
Task . Run ( async ( ) =>
37
31
{
@@ -101,7 +95,7 @@ private async void CheckForUpdates()
101
95
}
102
96
else
103
97
{
104
- CardCheckForUpdates . Description = $ "Current version: { _appLatestVersion } ";
98
+ CardCheckForUpdates . Description = $ "Current version: { Config . AppVersion } ";
105
99
}
106
100
107
101
ButtonCheckForUpdates . IsEnabled = true ;
0 commit comments