mirror of
https://github.com/ppy/osu.git
synced 2026-06-05 03:45:09 +08:00
Write only fixed release streams back to config
This commit is contained in:
@@ -1058,10 +1058,6 @@ namespace osu.Game
|
||||
if (RuntimeInfo.EntryAssembly.GetCustomAttribute<OfficialBuildAttribute>() == null)
|
||||
Logger.Log(NotificationsStrings.NotOfficialBuild.ToString());
|
||||
|
||||
// Make sure the release stream setting matches the build which was just run.
|
||||
if (Enum.TryParse<ReleaseStream>(Version.Split('-').Last(), true, out var releaseStream))
|
||||
LocalConfig.SetValue(OsuSetting.ReleaseStream, releaseStream);
|
||||
|
||||
var languages = Enum.GetValues<Language>();
|
||||
|
||||
var mappings = languages.Select(language =>
|
||||
|
||||
@@ -56,12 +56,16 @@ namespace osu.Game.Updater
|
||||
string version = game.Version;
|
||||
string lastVersion = config.Get<string>(OsuSetting.Version);
|
||||
|
||||
if (game.IsDeployedBuild && version != lastVersion)
|
||||
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))
|
||||
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);
|
||||
|
||||
if (RuntimeInfo.EntryAssembly.GetCustomAttribute<OfficialBuildAttribute>() == null)
|
||||
Notifications.Post(new SimpleNotification { Text = NotificationsStrings.NotOfficialBuild });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user