diff options
author | David KarlasĖ <david.karlas@microsoft.com> | 2018-04-13 15:55:44 +0300 |
---|---|---|
committer | monojenkins <jo.shields+jenkins@xamarin.com> | 2018-04-16 16:03:45 +0300 |
commit | 53358a83e02685004082e0f5a87830cdffff0278 (patch) | |
tree | 6a82806f1ceebb1d84573e94df39cf8a46f2d2bf /main/src/core | |
parent | 0194f63345827df93d2d103f083375155daf071d (diff) |
Fix 591345: [Updater] "Updates have been downloaded and are ready to install" still shown after updating to Alpha Problem was with changes around MonoDevelop.Ide.AddinUpdater.UpdateChannel/UpdateLevel migration where `idx` was not set for each channel resulting in UpdateChannel.Equals returning wrong values causing https://github.com/xamarin/md-addins/blob/5b4c8d9/Xamarin.Ide/Xamarin.Ide/Xamarin.Ide.Updater/UpdatesDialog.cs#L278 to not execute and update list of updatable items.
Diffstat (limited to 'main/src/core')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater/UpdateService.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater/UpdateService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater/UpdateService.cs index dff987d8c7..0613ef279a 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater/UpdateService.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater/UpdateService.cs @@ -89,7 +89,17 @@ namespace MonoDevelop.Ide.Updater var updateChannelId = PropertyService.Get<string> ("MonoDevelop.Ide.AddinUpdater.UpdateChannel"); if (string.IsNullOrEmpty (updateChannelId)) return UpdateChannel.FromUpdateLevel (PropertyService.Get ("MonoDevelop.Ide.AddinUpdater.UpdateLevel", UpdateLevel.Stable)); - return new UpdateChannel (updateChannelId, updateChannelId, "", 0); + if (UpdateChannel.Stable.Id == updateChannelId) + return UpdateChannel.Stable; + else if (UpdateChannel.Beta.Id == updateChannelId) + return UpdateChannel.Beta; + else if (UpdateChannel.Alpha.Id == updateChannelId) + return UpdateChannel.Alpha; + else if (UpdateChannel.Test.Id == updateChannelId) + return UpdateChannel.Test; + else + //idx matters in .Equals() so we can't do `new UpdateChannel (updateChannelId, updateChannelId, "", 0);` + throw new NotImplementedException ($"Unknown update channel id:{updateChannelId}"); } set { PropertyService.Set ("MonoDevelop.Ide.AddinUpdater.UpdateChannel", value.Id); |