From 749dcc6ed2665f6005f47d0d1881729bd6dddc34 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sat, 7 Jun 2025 11:24:35 +0800 Subject: [PATCH] Show release version after update --- .../UserSettings/Settings.cs | 3 ++- Flow.Launcher/MainWindow.xaml.cs | 13 +++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 892045994..0a6429e07 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -33,7 +33,6 @@ namespace Flow.Launcher.Infrastructure.UserSettings _storage.Save(); } - private string _theme = Constant.DefaultTheme; public string Hotkey { get; set; } = $"{KeyConstant.Alt} + {KeyConstant.Space}"; public string OpenResultModifiers { get; set; } = KeyConstant.Alt; public string ColorScheme { get; set; } = "System"; @@ -64,6 +63,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings OnPropertyChanged(); } } + private string _theme = Constant.DefaultTheme; public string Theme { get => _theme; @@ -79,6 +79,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings } public bool UseDropShadowEffect { get; set; } = true; public BackdropTypes BackdropType{ get; set; } = BackdropTypes.None; + public string ReleaseNotesVersion { get; set; } = string.Empty; /* Appearance Settings. It should be separated from the setting later.*/ public double WindowHeightSize { get; set; } = 42; diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index b266d3dc0..7ffd50aed 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -121,6 +121,9 @@ namespace Flow.Launcher // Set First Launch to false _settings.FirstLaunch = false; + // Update release notes version + _settings.ReleaseNotesVersion = Constant.Version; + // Set Backdrop Type to Acrylic for Windows 11 when First Launch. Default is None if (Win32Helper.IsBackdropSupported()) _settings.BackdropType = BackdropTypes.Acrylic; @@ -132,8 +135,14 @@ namespace Flow.Launcher welcomeWindow.Show(); } - var releaseNotesWindow = new ReleaseNotesWindow(); - releaseNotesWindow.Show(); + if (_settings.ReleaseNotesVersion != Constant.Version) + { + // Update release notes version + _settings.ReleaseNotesVersion = Constant.Version; + + var releaseNotesWindow = new ReleaseNotesWindow(); + releaseNotesWindow.Show(); + } // Initialize place holder SetupPlaceholderText();