Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit 74af950

Browse files
committed
Update About.xaml.cs
1 parent 88d773f commit 74af950

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

sakuragram/Views/Settings/About.xaml.cs

+4-10
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using System.Threading.Tasks;
55
using Windows.Storage;
66
using CommunityToolkit.WinUI.Controls;
7-
using Microsoft.UI.Dispatching;
87
using Microsoft.UI.Xaml;
98
using Octokit;
109
using Page = Microsoft.UI.Xaml.Controls.Page;
@@ -16,22 +15,17 @@ public partial class About : Page
1615
private GitHubClient _githubClient = App._githubClient;
1716

1817
private readonly ApplicationDataContainer _localSettings = ApplicationData.Current.LocalSettings;
19-
private string _appName;
20-
private readonly string _appLatestVersion;
18+
private string _appName = Config.AppName;
2119
private string _appLatestVersionLink;
2220
private static readonly Services.UpdateManager _updateManager = App.UpdateManager;
2321

2422
public About()
2523
{
2624
InitializeComponent();
2725

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}";
3327

34-
TextBlockVersionInfo.Text = $"Current version: {_appLatestVersion}, TdLib {Config.TdLibVersion}";
28+
TextBlockVersionInfo.Text = $"Current version: {Config.AppVersion}, TdLib {Config.TdLibVersion}";
3529

3630
Task.Run(async () =>
3731
{
@@ -101,7 +95,7 @@ private async void CheckForUpdates()
10195
}
10296
else
10397
{
104-
CardCheckForUpdates.Description = $"Current version: {_appLatestVersion}";
98+
CardCheckForUpdates.Description = $"Current version: {Config.AppVersion}";
10599
}
106100

107101
ButtonCheckForUpdates.IsEnabled = true;

0 commit comments

Comments
 (0)