Make X skip buttons in changelog work better for modpacks #4143
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
If you install a modpack from a .ckan file, the X icons from #4033 are available, but clicking them and confirming the popup simply closes the changeset rather than removing the selected change.
Originally reported by Discord user Tollwütige Banane after trying out the dev build for its modpack fixes.
Cause
When you click the X and confirm, it raises an event that triggers
ManageMods.RemoveChangesetItem
, which only works properly if you selected the changeset via the checkboxes in Manage Mods. The changeset for a modpack comes from elsewhere, so ManageMods was instead doing nothing and then refreshing the changeset tab with an empty changeset, which causes it to close.Changes
ManageMods.RemoveChangesetItem
only refreshes the changeset if it actually removes the change you clicked from its own changeset; it will do nothing if it originated in a modpack.