diff --git a/Image sort.Communication/UpdaterConstants.cs b/Image sort.Communication/UpdaterConstants.cs index f0abd774..ca7362fb 100644 --- a/Image sort.Communication/UpdaterConstants.cs +++ b/Image sort.Communication/UpdaterConstants.cs @@ -52,5 +52,9 @@ public class UpdaterConstants /// Signals that the new version number of the update is outputted in the next line. /// public const string UpdateVersion = "new_update_version"; + /// + /// Signals that the title of the new version is going to be outputted in the next line. + /// + public const string UpdateTitle = "transmitting_title"; } } diff --git a/Image sort.UI/MainWindow.xaml.cs b/Image sort.UI/MainWindow.xaml.cs index 94c9dd3d..9754b73b 100644 --- a/Image sort.UI/MainWindow.xaml.cs +++ b/Image sort.UI/MainWindow.xaml.cs @@ -1717,6 +1717,7 @@ await Task.Run(async () => { string changelog = ""; string version = "unknown"; + string title = ""; // and read the output till the end. while (!output.EndOfStream) @@ -1731,7 +1732,7 @@ await Dispatcher.InvokeAsync(async () => { // Create a new UpdateDialog to ask for user consent. var dlg = new UpdateDialog() { - ChangelogMarkdown = changelog, + ChangelogMarkdown = $"# {title}{Environment.NewLine}{changelog}", Version = version, Title = AppResources.UpdateConsentQuestion }; @@ -1787,6 +1788,11 @@ await Dispatcher.Invoke(() => this.ShowMessageAsync(AppResources.RateLimitExceed { version = output.ReadLine(); } + // if the title is going to be set, then read it. + else if (line == UpdaterConstants.UpdateTitle) + { + title = output.ReadLine(); + } // Tell the user that an error occured, if it occured. else if (line == UpdaterConstants.Error) { diff --git a/Image sort.UI/UpdateDialog.xaml b/Image sort.UI/UpdateDialog.xaml index 2211eac5..fbcdd5be 100644 --- a/Image sort.UI/UpdateDialog.xaml +++ b/Image sort.UI/UpdateDialog.xaml @@ -24,7 +24,7 @@ - +