From dace44ecc41f014adae355b52167770b72824217 Mon Sep 17 00:00:00 2001 From: Anna Date: Tue, 24 Oct 2023 16:55:08 -0400 Subject: [PATCH] fix: check for all changes when adding summary --- DownloadTask.cs | 4 ++-- Ui/BreakingChangeWindow.cs | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/DownloadTask.cs b/DownloadTask.cs index 1a68427..1d02bd9 100644 --- a/DownloadTask.cs +++ b/DownloadTask.cs @@ -1043,7 +1043,7 @@ private async Task ConstructGroups(IDownloadTask_GetVersion info) { } } - if (change.RemovedGroups.Count > 0) { + if (change.HasChanges) { using var handle = await this.Plugin.PluginUi.BreakingChangeWindow.BreakingChanges.WaitAsync(); handle.Data.Add(change); } @@ -1282,4 +1282,4 @@ public override long Position { get => this._inner.Position; set => this._inner.Position = value; } -} +} \ No newline at end of file diff --git a/Ui/BreakingChangeWindow.cs b/Ui/BreakingChangeWindow.cs index dbfaf42..a099407 100644 --- a/Ui/BreakingChangeWindow.cs +++ b/Ui/BreakingChangeWindow.cs @@ -156,4 +156,10 @@ internal class BreakingChange { internal List<(string Group, string[] RemovedOptions)> TruncatedOptions { get; } = new(); internal List<(string Group, string[] Old, string[] New)> DifferentOptionNames { get; } = new(); internal List<(string Group, string[] Old, string[] New)> ChangedOptionOrder { get; } = new(); -} + + internal bool HasChanges => this.RemovedGroups.Count > 0 + || this.ChangedType.Count > 0 + || this.TruncatedOptions.Count > 0 + || this.DifferentOptionNames.Count > 0 + || this.ChangedOptionOrder.Count > 0; +} \ No newline at end of file