Skip to content

Commit

Permalink
fix: check for all changes when adding summary
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-is-cute committed Oct 24, 2023
1 parent 98fdd6e commit dace44e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DownloadTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -1282,4 +1282,4 @@ public override long Position {
get => this._inner.Position;
set => this._inner.Position = value;
}
}
}
8 changes: 7 additions & 1 deletion Ui/BreakingChangeWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit dace44e

Please sign in to comment.