Show notification on first run after an update with a link to the changelog

Closes #487
This commit is contained in:
Tyrrrz
2023-02-09 17:13:22 +02:00
parent e7d80688aa
commit 1e7b8ec83f
4 changed files with 22 additions and 4 deletions

View File

@@ -106,6 +106,7 @@ public class RootViewModel : Screen, IHandle<NotificationMessage>, IDisposable
_settingsService.Load();
// Sync theme with settings
if (_settingsService.IsDarkModeEnabled)
{
App.SetDarkTheme();
@@ -114,6 +115,18 @@ public class RootViewModel : Screen, IHandle<NotificationMessage>, IDisposable
{
App.SetLightTheme();
}
// App has just been updated, display changelog
if (_settingsService.LastAppVersion != App.Version)
{
Notifications.Enqueue(
$"Successfully updated to {App.Name} v{App.VersionString}",
"CHANGELOG", () => ProcessEx.StartShellExecute(App.ChangelogUrl)
);
_settingsService.LastAppVersion = App.Version;
_settingsService.Save();
}
}
protected override void OnClose()