From 9684398d14ab4e20b53e952a4f2ca1c9ab649346 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 24 May 2026 00:33:47 +0900 Subject: [PATCH] Fix "Click to see what's new!" notification no longer appearing (#37875) - Regressed with https://github.com/ppy/osu/pull/37839. - Closes https://github.com/ppy/osu/issues/37870 I feel like `UpdateManager` should remain a background component, so moving this notification into a new stable execution path is best to me. --- osu.Game/OsuGame.cs | 9 ++++- osu.Game/Updater/UpdateManager.cs | 57 ++++++++++++++----------------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index aa49a450b2..b9a13ac368 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -1301,10 +1301,17 @@ namespace osu.Game applyConfigMigrations(); + string lastVersion = LocalConfig.Get(OsuSetting.Version); + string version = Version; + + // only show a notification if we've previously saved a version to the config file (ie. not the first run). + if (IsDeployedBuild && !string.IsNullOrEmpty(lastVersion) && version != lastVersion) + Notifications.Post(new UpdateCompleteNotification(version)); + // finally, update the version stored to the configuration. // this MUST happen after `applyConfigMigrations()` call, as it relies on comparing the previous version. // debug / local compilations will reset to a non-release string. - LocalConfig.SetValue(OsuSetting.Version, Version); + LocalConfig.SetValue(OsuSetting.Version, version); } /// diff --git a/osu.Game/Updater/UpdateManager.cs b/osu.Game/Updater/UpdateManager.cs index 1db509bd52..091fe7061f 100644 --- a/osu.Game/Updater/UpdateManager.cs +++ b/osu.Game/Updater/UpdateManager.cs @@ -56,15 +56,8 @@ namespace osu.Game.Updater { base.LoadComplete(); - string version = game.Version; - string lastVersion = config.Get(OsuSetting.Version); - if (game.IsDeployedBuild) { - // only show a notification if we've previously saved a version to the config file (ie. not the first run). - if (!string.IsNullOrEmpty(lastVersion) && version != lastVersion) - Notifications.Post(new UpdateCompleteNotification(version)); - // make sure the release stream setting matches the build which was just run. if (FixedReleaseStream != null) config.SetValue(OsuSetting.ReleaseStream, FixedReleaseStream.Value); @@ -137,31 +130,6 @@ namespace osu.Game.Updater updateCancellationSource.Dispose(); } - private partial class UpdateCompleteNotification : SimpleNotification - { - private readonly string version; - - public UpdateCompleteNotification(string version) - { - this.version = version; - Text = NotificationsStrings.GameVersionAfterUpdate(version); - } - - [BackgroundDependencyLoader] - private void load(OsuColour colours, ChangelogOverlay changelog, INotificationOverlay notificationOverlay) - { - Icon = FontAwesome.Solid.CheckSquare; - IconContent.Colour = colours.BlueDark; - - Activated = delegate - { - notificationOverlay.Hide(); - changelog.ShowBuild(version); - return true; - }; - } - } - public partial class UpdateDownloadProgressNotification : ProgressNotification { private readonly CancellationToken cancellationToken; @@ -259,4 +227,29 @@ namespace osu.Game.Updater } } } + + public partial class UpdateCompleteNotification : SimpleNotification + { + private readonly string version; + + public UpdateCompleteNotification(string version) + { + this.version = version; + Text = NotificationsStrings.GameVersionAfterUpdate(version); + } + + [BackgroundDependencyLoader] + private void load(OsuColour colours, ChangelogOverlay changelog, INotificationOverlay notificationOverlay) + { + Icon = FontAwesome.Solid.CheckSquare; + IconContent.Colour = colours.BlueDark; + + Activated = delegate + { + notificationOverlay.Hide(); + changelog.ShowBuild(version); + return true; + }; + } + } }